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)
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.