concept DocumentStore in category ravendb

appears as: DocumentStore, DocumentStore
RavenDB in Action

This is an excerpt from Manning's book RavenDB in Action.

After initializing a DocumentStore object, the connection between your application and the RavenDB server is established. You now want to start talking with the server and perform read or write operations against it. Whereas the DocumentStore is the communication pipe, a session object is the work context in which the developer—you—will be working to perform most operations against RavenDB. There are only a few things you’ll need to access the DocumentStore directly for, and we’re going to visit them later in the book.

A session object is very cheap to create and very easy to use. To create a session, you simply call DocumentStore.OpenSession(). Also make sure to dispose of it when finished (in the example here, the using will do that for you):