I have seen a couple of references stating that WCF Data Services handles change tracking automatically. Does that mean you don’t need to create Self Tracking Entities (STE) and it works automatically with any entity object type? Sorry, a bit confused here and have been struggling to find a resource that clears this up for me.
Thanks
WCF Data Services has an explicit (i.e. you tell the
DataServiceContextwhat has changed) model.However if you are using a
DataServiceCollection<>– which is often the case – and making changes through it, then it takes care of telling theDataServiceContextwhat has happened for you.Then when you call
DataServiceContext.SaveChanges()your changes are pushed to the server.As for Self Tracking Entities (STEs) they don’t work with WCF Data Services because the materialization of objects off the wire (from OData format) and the STE’s fixup logic are incompatible.