In our layered application, we are accessing database via WCF calls. We are creating and disposing contexts per request. Also we are using POCO approach.
My question is, in pure POCO model (completely persistent ignorant POCOs) is it possible to track the changes, while we are creating and disposing context per request (as previous context is disposed in that service call)? If yes how EF handles this situation? As far as I can see 2 mechanisms (snapshot based change tracking and notification based change tracking with proxies) will not be able to handle this? If not, how should we handle context so that we are able to track the changes?
I'd say:
Do not use self-tracking entities in a pure SOA environment: The self-tracking entities only work when your clients use the generated proxy classes.
When you're doing SOA by the book, you cannot expect your clients to be .Net, or even more, .Net 4.0; Which is the only scenario in which self-tracking entities will work. Your services will be useless to any other clients.
Just My 2 cents, Regards, Koen
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With