Database Reference
In-Depth Information
value of WIN-..... . We will create an entity object to mimic the document data used
previously to create our own list:
namespace MVCApp.Mapping
{
public class SubscriptionExt
{
public string MessageType { get; set; }
public List<Address> Clients { get; set; }
}
public class Address
{
public string Queue { get; set; }
public string Machine { get; set; }
}
}
We can see that there is a MessageType with a list of Clients containing Queue and
Machine . We need to mention that this code snippet found at https://gist.github.com/jo-
hannesg/7984309 was helpful.
To display a list in the view, I am going to use a simpler object where I don't have to
worry about walking down multiple link lists until later, and just show the first client's
values. This will be the object to populate my view:
public class SubscriptionExtView
{
public string MessageType { get; set; }
public string Queue { get; set; }
public string Machine { get; set; }
}
So let's recap. We have the view and entity objects defined. We will populate a list of
these objects that we read from a session to the database, as we did in the EF context and
the NHibernate session. Now, we start a RavenDB session. The RavenDB session uses a
URL as a connection string to the database. Once we open the session, we are going to
search for the data. One of the many features of RavenDB, especially in searching is that
RavenDB uses Lucene. Lucene is an open source Apache search engine software; for
more information, see https://lucene.apache.org . For building Lucene queries in
Search WWH ::




Custom Search