freezegravity
asked on
Item updated in database after savechanges but linq to entity query can't find update
Hello Experts,
In my controller, I have an ActionResult method that calls an Add and after that does SaveChanges.
When I query the database in SQL server, I get the item with all the fields updated properly. But, when I run the query in linq, I can't get the item (it returns 0 for the entries it found for a specific id). However, querying for other items works fine.
Is there another call I need to make to update the EF from the database update? What else could be the problem?
Thanks a ton!
In my controller, I have an ActionResult method that calls an Add and after that does SaveChanges.
When I query the database in SQL server, I get the item with all the fields updated properly. But, when I run the query in linq, I can't get the item (it returns 0 for the entries it found for a specific id). However, querying for other items works fine.
Is there another call I need to make to update the EF from the database update? What else could be the problem?
Thanks a ton!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.