Welcome to the MongoDB.Context project!
This project aims to simplify access to (and modification of) MongoDB entities. I've been working on this project for some weeks now offline, and thought it time to bring it to the open source domain for assistance and advice.
Background
If you've used the Official MongoDB driver for C# before, you'll know the level of complexity in performing trivial queries, let alone updates to those entities. The inspiration from this project comes from the Linq2Sql DataContext syntactical pattern, which I have become very familiar with through my software engineering experience at my Monday-Friday job.
Roadmap and vision
As above, the main inspiration for this project came from Linq2Sql DataContext, meaning the syntax (in an ideal implementation) would be similar to the following:
using (var ctx = new MongoDbContext())
{
var entity = ctx.Entities.Find(z => z.Foo == "Bar").SingleOrDefault();
entity.Baz = 1;
ctx.SubmitChanges();
}
Authors and Contributors
@cadams93 - main contributor
If you want to see your name in this list, please do not hesitate to contribute, critique and assist!
Assumptions and Drawbacks (current)
- Currently the main MongoDbContext class is manually generated to include the Entities property - main access to the MongoDB entities named
Entity
. Eventually this shall be replaced by an automatically generated context - An assumption has been made that ALL entities stored in MongoDB to be accessed through the MongoDbContext will inherit from AbstractMongoEntityWithId, with a given _id generic type