How can you enhance the performance of Entity Framework?



To enhance the performance of Entity Framework, you have to follow the following steps:


  • Try to avoid to put all the DB objects into one single entity model
  • Disable change tracking for entity if not needed
  • Reduce response time for the first request by using pre-generating Views
  • If not required try to avoid fetching all the fields
  • For data manipulation select appropriate collection
  • Wherever needed use compiled query
  • Avoid using Views and Contains
  • While binding data to grid or paging, retrieve only required no of records
  • Debug and Optimize LINQ query

Post a Comment

0 Comments