A NoRM-MongoDB Repository Base Class

added by zblock
5/29/2010 7:47:30 AM

0 Kicks, 388 Views

When working with data access frameworks that map .NET types to underlying persistence stores, generics can be used to provide very simple but powerful infrastructure. NHibernate, for example, makes it easy to create a base class that provides full CRUD support for any mapped type. By inheriting from this base class, a DAO or repository is able to query and modify its data source with no additional code. This article will introduce a similar pattern for working with NoRM and MongoDB.