We have an architecture where we use Entity Framework with POCO, and the code-first approach (no edmx file). In order to explain the problem I have to explain a little bit about our architecture:
We have one layer which contains Routing Services (for load balancing and security), and a layer of Data Access Services. All services are hosted in IIS.
What we would like is to have caching of our (Entity Framework) Context, so we made the context static, and thought it would be shared between the different services. Well, it's not...
The scenario (where we noticed the problem) was that we did some changes to an transaction through the Transaction services. We then did a search through the Search services, and found that the data wasn't updated. Well, actually the data are updated, and
saved to the DB, it's just that the "Search Context" is out of sync. When retrieving the data from the Transaction service, we got the correct data, as expected.
So, after hours of googling I still haven't found a solution to the problem, and I'm hoping to get some response here.
View Complete Post