NoSQL with RavenDB and ASP.NET MVC – Part 1
A while back, I have blogged NoSQL with MongoDB, NoRM and ASP.NET MVC Part 1 and Part 2 on how to use MongoDB with an ASP.NET MVC application. The NoSQL movement is getting big attention and RavenDB is the latest addition to the NoSQL and document database world. RavenDB is an Open Source (with a commercial option) document database for the .NET/Windows platform developed by Ayende Rahien.
Raven stores schema-less JSON documents, allow you to define indexes using Linq queries and focus on low latency and high performance. RavenDB is .NET focused document database which comes with a fully functional .NET client API and supports LINQ.
RavenDB comes with two components, a server and a client API. RavenDB is a REST based system, so you can write your own HTTP cleint API. As a .NET developer, RavenDB is becoming my favorite document database. Unlike other document databases, RavenDB is supports transactions using System.Transactions.
Also it’s supports both embedded and server mode of database. You can access RavenDB site at http://ravendb.net. Let’s create a simple demo app with RavenDB and ASP.NET MVC. To work with RavenDB, do the following steps.
Go to http://ravendb.net/download and download the latest build.
Unzip the downloaded file.
Go to the /Server directory and run the RavenDB.exe.
This will start the RavenDB server listening on localhost:8080. You can change the port of RavenDB by modifying the “Raven/Port” appSetting value in the RavenDB.exe.config file. When running the RavenDB, it will automatically create a database in the /Data directory.
You can change the directory name data by modifying “Raven/DataDirt” appSetting value in the RavenDB.exe.config file.
RavenDB provides a browser based admin tool. When the Raven server is running, You can be access the browser based admin tool and view and edit documents and index using your browser admin tool. The web admin tool available at http://localhost:8080.
View the Original article