Srikanth manadi, development leader of Entity Framework, saidArticleTo solve the big data model problems in Entity Framework, but it clearly means "using some tips" to solve these problems. This article first talks about the expected number of entities between 50 and 100 for any application. Beyond this range, the editor cannot be used.
Entity Framework has some serious performance problems. For example, every time a new connection string is used, XML-based metadata for the entire data model is loaded into the memory. If you have small applications that share common data models, adding new entities to any of them will slow down all applications. In essence, this restriction makes it impossible for us to put the Entity Framework data model into the shared library.
Generating a view is another failure of Entity Framework Design. Srikanth manadi explains:
This process starts when a query or savechanges occurs for the first time. The performance of the view generation step depends not only on the model size, but also on the relationship between the models. If two entities are connected through an inheritance chain or association, we call them connected. Similarly, if two tables are connected by a foreign key, we also call them connected. As the number of tables connected to the object and schema increases, the cost of view generation increases.
To solve these problems, Srikanth manadi recommends dividing big data models into Small subsets. There are two ways to do this, but they don't feel very good.
The first is to use a completely independent subset. If two or more subsets require a table, create independent entities for them. In this way, direct calls across subsets cannot be implemented, and the entity may be overly expanded.
Another way is to "use" the syntax in schema. IDE does not support this. We need to manually edit the XML to indicate that the database needs to use entities in another data model. In addition to the pain of manually editing XML, it can only create one-way connections. If data model A uses an entity in Data Model B, the latter cannot reference the former.
You can read the first and second sections of this article on the blog of the ADO. Net team.