How to stop entity framework caching

We're having a problem testing Entity Framework 4.

We've deployed a WCF service that implements an EF data context. All works fine untill we modify the data using SQL server studio.

Is there a way to stop EF caching our results or is there any way to turn eager loading on?

Cheers,

James

Answers


On the property sheet for your model, you can set the Lazy Loading Enabled property.

Through code, you can control lazy loading with the ObjectContextOptions.LazyLoadingEnabled property:

context.ContextOptions.LazyLoadingEnabled = false;

Need Your Help

Serialize django model with foreign key models

python django

How to serialize dajngo model in json format if i want include foreign key models fields.

How do I use Eloquent ORM to retrieve data from a database in Laravel

laravel eloquent

I'm new to MVC and do not understand it very much at all. I have a database with one table called products

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.