h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

Tips to improve Entity Framework Performance

Tips to improve Entity Framework Performance


  • Avoid to put all the DB Objects into One Single Entity Model
  • Disable change tracking for entity if not needed
  • Use Pre-Generating Views to reduce response time for first request
  • Avoid fetching all the fields if not required
  • Choose appropriate Collection for data manipulation
  • Use Compiled Query wherever needed
  • Retrieve only required number of records
  • Avoid using Contains
  • Avoid using Views
  • Debug and Optimize LINQ Query