ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

Any example of having faster processing using Entity framework?

user-image
تم إضافة السؤال من قبل Khurram Yazdani , Senior Manager , PAF Hospital
تاريخ النشر: 2016/07/12
Morad Aktam
من قبل 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:

  1. Favor foreign key relationships over independent relationships between the entities.
  2.  Use pre-generated views in order to minimize cold queries.
  3. 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.
  4. 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.

المزيد من الأسئلة المماثلة