Get flash to fully experience Pearltrees
ADO.NET Entity Framework (EF) is an open source [ 1 ] object-relational mapping (OR) framework for the NET Framework . [ edit ] Overview The Entity Framework is a set of technologies in ADO.NET that support the development of data-oriented software applications.
Introduction A popular pattern for ORM data access is the Repository pattern. Repositories are currently very popular even in EF for the reasons below: Hide EF from upper layer Make code better testable The big disadvantage of EF is rigid architecture which can be hardly mocked, so if you want to unit test upper layer you must wrap EF somehow to allow mocking its implementation. The solution I'll show is a very simple implementation of this pattern using EF 4.1 and code first to generate the database. Using the code
My Considerations Until now I used some custom orm tool (written by me), it was working with stored procedures, because my idea is that the best optimization you may accomplish in sql code. But now as the project increased and its fonctionality has blow up, I realise that in the future must be used some more adapted orm for supporting Domain Model and Data Mapper, with wich can be used in a more simple fashion the concepts of Unit of Work, Repositories etc. I indeed fell the necessity to pass to this kind of aproach because Transaction Script approach that I used in conjuction with Data Mapping leads in hard maintenace problems when in enterprise application you have sophisticated workflows and transactions to be performed.
nHydrate is an object-relational mapping (ORM) solution for the Microsoft .NET platform providing a framework for a relational database to be mapped to .NET objects. It is designed to alleviate the drudgery software developers experience writing persistence domains. nHydrate is free as an open source project on Codeplex.com under the Microsoft Public License (Ms-PL). nHydrate was originally created in 2003 as a private project to solve the issues with the .NET Framework 1.1.