Project Description
Repository Management Framework for .NET provides a simple way of managing CRUD based operations on data objects generated by LINQ based providers.

Author
Nikola Kocic, nikolakocic.com

Framework Features

  • Encapsulates underlying provider create, update, and delete functionality into each repository implementation for a data object
  • Repository implementations are light, simple, and only require appropriate retrieval methods to be implemented
  • Pre-operation support for Create, Update, Delete
  • Supports context operation deferral so that any changes made to underlying context are done at the object disposal
  • Supports a single context re-usability
  • Include methods for ad-hoc data retrieval, saving, and deleting

Included in Framework 

  • Repository Management for LINQ to Entities generated data objects
  • Repository Management for LINQ to SQL generated data objects
  • Repository Management for CRM 4 Advanced Developer Extensions generated data objects
  • Repository Management for a text file, including delimited files

Entity Framework 4 Example - Retrieve a Person and Update

using (new EntityExecutionContext<SampleDataModelEntities>())
{
    var person = EntityRepositoryManager<Sample.EF4.Model.Person, SampleDataModelEntities>.Retrieve(p => p.FirstName == "Nikola" && p.LastName == "Kocic").SingleOrDefault();
    person.Age = 31;
    EntityRepositoryManager<Sample.EF4.Model.Person, SampleDataModelEntities>.SaveEntityObject(person);
}

Last edited Jan 20, 2012 at 6:55 PM by darkjedi, version 19