Monday 14 December 2015

ASP.NET Tips #60 - Minimize your database calls

While Entity Framework can be a fantastic ORM tool, it can also be a major pain when you are executing a number of calls that are constantly hitting the database.

For simple database activities (SELECT, INSERT, UPDATE, or DELETE), use Entity Framework's standard Add, SaveChanges,and Delete methods. For complex result sets, it can sometimes be more efficient to place them in a stored procedure and leave the heavy lifting to the database.

No comments :

Post a Comment