-
Notifications
You must be signed in to change notification settings - Fork 82
Home
jfreal edited this page Aug 13, 2010
·
26 revisions
- Strongly-typed interaction when querying and updating collections.
- Improved interface to send common Mongo commands (creating indices, getting all the existing dbs and collections, etc.).
- Ultra-fast de/serialization of BSON to .Net CLR types and back.
- LINQ-to-Mongo
- Support for Mono
//connString is a URI to the database with the credentials you need. var coll = (new Mongo(connString)).GetCollection<Product>(); //create a new object to be added to the collection var obj = new Product(); obj._id = ObjectId.NewObjectID(); obj.Title = "Shoes"; //save the object coll.Insert(obj); //find the object var obj2 = coll.FindOne(new { _id = obj._id}).First();
BSON Serializer — Just as BSON is the core of MongoDB, this is the core of NoRM. In order to provide a powerful serializer, we have rules about what you can & cannot serialize, reading this page will save you a lot of time in debugging.
Flyweight — Because we want to do as much as possible in a strongly-typed way, NoRM is built around the concept of using class definitions as document templates. We realize there will be times when it will be favorable to have arbitrary properties for a given entity. Flyweight helps us to have the best of both worlds.
Interested in contributing but having a hard time getting tests to pass? The Passing Tests page will help you get things setup.