Most Important Entity Platform Constraints

What are the most important ADO.NET Entity Framework 4.0 limitations that business application developers should be aware of?

I used it in some of my home projects, and it seems very effective, but I am worried about the problems that I will have to face when I create large, more complex data driven business applications. I am particularly interested in how choosing to use the Entity Framework to access my data can limit the various design patterns / architectures that I can use when creating my project.

Since I am thinking about using an entity structure in future projects, I am interested in the limitations of the current version of the Entity Framework.

+4
source share
2 answers

You need to know about database chatter. Saving a whole graph of objects is actually not a good idea. When executing a complex query and update, EF will always try to update the inserted objects. The solution to this is the complex logic of the request and update in the stored process and by passing graphs of objects through XML / string, etc. For one DB call.

Another problem with EF during the first design or first database modeling is that the Entity classes themselves are bound to the framework through inheritance. There are several strategies in this, I have a blog post that allows you to use POCO while extracting the interface for bullying, which is very convenient.

Getting an entity structure to create an interface for Mocking

+3
source

It probably should be a CWiki, however I will roll with punches.

The key to a good EF implementation is an intelligent mix of proper domain modeling (TPT for flexibility, TPH for performance, inheritance), abstraction of retention logic (repository template, POCOs, dependency injection) and knowledge of when to use stored procedures for tasks requiring a large amount of data .

If you want to get into nitty-gritty, the only restrictions I found with EF is the lack of support for displaying enums (this should be fixed soon).

IMO, the limitation is actually not in the product, this is in the absence of developers' commitment to the general principles and principles of architecture.

+2
source

All Articles