0

I don't seem to be able to reproduce the issue everytime but what happens is that when I sometime update something in database and then get then try to get the updated entity from database, I don't get the updated value, but mostly I do.

How to maintain the Entity Framework context and what is the criteria to destroy the context and renew it?

marc_s
  • 704,970
  • 168
  • 1,303
  • 1,425
WAQ
  • 2,420
  • 6
  • 37
  • 84
  • 1
    To address your stated question: basically, you should always try to call the context in a `using` statement. If you can post an example of code where you get a value that should have been updated, but wasn't, then we can try to help you with that. – DrewJordan Aug 20 '15 at 13:21
  • 1
    See [here](http://stackoverflow.com/questions/10585478/one-dbcontext-per-web-request-why/10588594#10588594) – qujck Aug 20 '15 at 13:22

0 Answers0