من قبل
Morad Aktam , Senior Software Engineer / .NET developer , Chipsoft
There many Technics that you can follow in order to get performance using entity framework. Following are some hints that may help you reaching your goals:
Favor foreign key relationships over independent relationships between the entities.
Use pre-generated views in order to minimize cold queries.
When reading records that you may not use directly on your data context, use the asnotracking function in your LINQ queries to avoid updating the object graph which is time consuming.
It depends on the context, however favoring eager or lazy loading may make a lot of difference. And when using eager loading don't use more that three includes in one query.