I am having trouble figuring out something with the Entity Framework Code First stuff in CTP 5. It is doing caching of objects and I don't want it to. For example, I load a page (working with an ASP.NET MVC site) which loads an object. I then go change the database. I re-load the page and the changes are not reflected. If I kill the site and rerun it then it obviously re-fetches. How do I, either generally for a type, or even for a particular query, tell it to always go get a new copy. I think it might have something to do with MergeOption but I'm having trouble finding examples that work with CTP 5. Thanks.
Turn Off Object Caching in Entity Framework CTP5
3.6k Views Asked by Mallioch At
1
There are 1 best solutions below
Related Questions in ENTITY-FRAMEWORK-CTP5
- Inserting a decimal into sql cause inserting a zero number Instead of a decimal number near zero
- Inheritance with EF Code First – Table per Type (TPT)
- Issue loading child entity of a parent entity. Unidirectional mapping and 1 to 0..1 relationship with a Shared primary Key?
- What Causes The INSERT statement conflicted with the FOREIGN KEY constraint?
- Mapping tables in Entity Framework
- How to save a server generated complex object tree with entities that are not yet exsisting in the database?
- One-To-Many Entity Framework 5 Update with code first
- Avoiding Circular referencing providing too much data
- How can I have a Foo with exactly one Bar in EF 5 Code First
- How can I create a 1:1 relationship in Entity Framework?
- Entity Framework 5 - Could not load file or assembly EntityFramework, Version=5.0.0.0
- Many to many relation with the same table with EF4.3 Code First
- Transparently converting nullable values into non-nullable values in Entity Framework
- What is the Default Database for Entities Code-First without defined Connection String?
- no key defined EntityFramework CTP5
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Okay, figured it out. The following will sometimes pull from the EF cache:
You can use AsNoTracking() to bypass the change tracking/caching stuff: