In this chapter, we will be focusing on snippets about persistence. We will discuss NHibernate, RavenDB, and MongoDB.
We will dive into the code to accomplish some database tasks since it relates to NServiceBus. This code can be applied to many tasks that are not ESB-specific. But this is a much-needed chapter on database code itself. We will create SQL Server databases without the use of SQL code and read tables that NServiceBus created in RavenDB. We will show how to create tables with code, read and display tables in NHibernate and RavenDB, and even send ourselves an e-mail with the error queue count. This will be the applied theory in this chapter.
In this chapter, we will cover:
Entering NHibernate
Using saga and NHibernate
Defining NHibernate
The saga database data
Logging
Entering RavenDB
Entering MongoDB