Hi there,
I'm trying to achieve a form of two phase commit using Entity Framework 1.0.
What I would like to achieve at a high level is:
- get all the data from the database and store this in a cache.
- modify individual entities
- Commit all changes into the database
The problem's i've encountered so far is that caching an IQueryable is a bit pointless as it's going to go back to the database regardless. So the other option is to use IEnumberable for storing the results of a query, but that stops me inheriting one query and refining it into another (I can live with that however). The other problem is that as soon as the EntityContext expires (which i've managed to persist in the current httprequest) that's it, no changes can be tracked.
Has anyone tried to do something similar to this in the past or got any pointers?
Many thanks, Matt
jumpingmattflash.co.uk