Database Reference
In-Depth Information
Entering RavenDB
We have briefly discussed RavenDB in the earlier chapters of this topic. NSB takes care of
the document mapping in the RavenDB database; however, we will cover some of the ba-
sics of RavenDB in a typical C# program without NSB. I will remind you to review the
RavenDB licensing when working with RavenDB.
RavenDB is a document-oriented store database that is used by many defaults in NSer-
viceBus and makes use of the JSON format. See https://ravendb.net/ for more information.
In our previous PubSub example, we took out most pieces of the persistence from
RavenDB and put it in a SQL Server. Now, we will put the subscriptions back into
RavenDB.
This is done by deleting .UseNHibernateSubscriptionPersister() , which we
put earlier in the PubSub MyPublisher example. After deleting this piece of code, NSer-
viceBus will default to storing the subscription information back into RavenDB. When run-
ning the PubSub example, we can see that the subscription information was generated in
RavenDB.
However, this section is about accessing RavenDB through snippets of code. Our end goal
is to display the following screenshot through MVCApp by code so that we can later ex-
tend the persistence of NServiceBus to automatically log, monitor, and do more as we have
been going through in this topic. We wish to write the code to display it in the browser
without the RavenDB admin tool to show the following screenshot:
Search WWH ::




Custom Search