Click here to Skip to main content
13,588,680 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 25 Jan 2012
Licenced CPOL

EF 4.1 Cached object performance tip

, 25 Jan 2012
Rate this:
Please Sign up or sign in to vote.
A performance tip for EF 4.1

The Find() method on your DbContext allows you to get a specific object, based on its primary key from the database the first time. Thereafter, it gets it from the context's cache, instead of making a round trip to the database each time you request that object. Thus, you get faster performance because there are no extra calls to the database.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Dean Oliver
Software Developer BBD Johannesburg
South Africa South Africa
Bsc (Hons) Business Information Systems.
MCTS: Web Applications Development with Microsoft .NET Framework 4
MCTS: Windows Communication Foundation Development with Microsoft .NET Framework 4
MCTS: Accessing Data with Microsoft .NET Framework 4
Microsoft Certified Professional Developer Certification.

You may also be interested in...


Comments and Discussions

QuestionWebsite Pin
jratcliff774031-Jan-12 3:04
memberjratcliff774031-Jan-12 3:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web03 | 2.8.180615.1 | Last Updated 25 Jan 2012
Article Copyright 2012 by Dean Oliver
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid