Quick Start
Documentation
Discuss
Samples
Contribute
Three steps to building highly flexible and scalable applications with
C#
and
MongoDB
Get Mongo
Download it now
Get
Download it now
Party Time!
using(var db = Mongo.Create("mongodb://localhost/BlogDB")) { //get LINQ access to your Posts //Mongo created the database and collection on the fly! var posts = db.GetCollection
().AsQueryable(); //insert into collection posts.Insert(new Post{ID = 1, Title="Hello NoRM" , Body="Hello MongoDB"}); //find a post by id var p1 = posts.FirstOrDefault(p=>p.ID == 1); //update the post. p1.Title= "NoRM, a perfect complement to MongoDB!"; posts.Save(p1); }
Copy to Clipboard
Copyright 2010 by Andrew Theken
Sponsored by