Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entity framework - All tables in one edmx file

Will putting all my tables in a single edmx significantly harm performance? I have heard this is a bad practice, but this was before entity implemented lazy load. So, now that we have entity 4, is it a non-issue?

I plan to abstract my Models by extending the partial classes of each generated entity, implementing ICrud<ConcreteModel>. This, combined with MVC3 should nullify any coupling concerns.

like image 467
P.Brian.Mackey Avatar asked Feb 28 '11 21:02

P.Brian.Mackey


People also ask

What is EDMX file in entity Framework?

edmx file is an XML file that defines an Entity Data Model (EDM), describes the target database schema, and defines the mapping between the EDM and the database. An . edmx file also contains information that is used by the ADO.NET Entity Data Model Designer (Entity Designer) to render a model graphically.

How do I update a single table in EDMX?

right click edmx file > update model from data base > Refresh tab > Tables > select the table(you want to update) and press finish that's it.

How do I manually edit EDMX?

edmx file open in Visual Studio, you should be able to simply right-click on a table or a column in the table and choose 'rename'. Once you change the name it will be reflected in the Mapping Details window. Problem is that's editing the entity names and properties, not the underlying SQL tables and columns.


1 Answers

Yes, it does hurt the performance. Performance Issues in Metadata Load Times and in View Generation are the results of a big EDMX model.

Take a look at this post where I discussed this matter at length:

Entity Framework 4: Does it make sense to create a single diagram for all entities?

like image 160
Morteza Manavi Avatar answered Oct 13 '22 10:10

Morteza Manavi