NoRM - Bringing MongoDB to .NET, LINQ, and Mono
Just because you’re slinging C# doesn’t mean that Microsoft SQL Server is the only database in town, you know. Want to play with MongoDB? Then give NoRM from Andrew Theken a look. NoRM aims to: A quick code example from the Wiki: Glad to see Northwind Traders has upgraded to MongoDB…
//open collection
var coll = (new MongoServer()).GetDatabase("Northwind")
.GetCollection<Product>();
//create a new object to be added to the collection
var obj = new Product();
obj._id = BSONOID.NewOID();
obj.Title = "Shoes";
//save the object
coll.Insert(obj);
//find the object
var obj2 = coll.FindOne(new { _id = obj._id}).First();


