entity framework - How to implement EF with dynamic conceptual layer? -
I have a specific scenario that I'm thinking (and how) the entity might be able to resolve the framework.
I am developing a framework for a new solution that will be given to developers to increase and increase over time. I would like to provide a simple data access layer, which can be applied with domain access, which are implementing them without the need to modify data access codes. I am checking different devices, such as NHibernate, LINQ-to-SQL, EF as well as good old ADO.NET
The code will get GetTable calls in the LINQ-to-SQL domain layer & lt; T & gt; The method on L2S DataContext is an IQueryable & lt; T & gt; gives. Theoretically, this means that the datacontext can solve the request for any t. Of course, in fact, Datacontext has to know how T handles.
How EF works, I see some similarities to the device, but I do not know how I can accomplish my goals What I would like to do here:
I provide a default "reference" that highlights a method like GetTable & lt; T & gt; (Such as the question & lt; T & gt;) that is the IQueryable & lt; T & gt; gives. This allows future enhancements where T represents the entity type that has not yet been implemented and makes it easy for developers to focus on the domain layer because they all need GetTable & lt ; T & gt; (Or similar).
The only other requirement on the domain developer is to provide a mapping layer where the conceptual layer (T) is mapped to the storage layer (physical database schema).
FWIW, I believe that this can easily be accomplished through mapping XML file with NHibernate, is there any way of working with EF?
Many questions dealing with this same topic are those discussions on the pros and cons of EF vs. Anniberrate etc. But it is very easy to create a very common data access layer with EF.
Comments
Post a Comment