I need to be able to retrieve the etag from an Azure query, and attach them to my entities. The service will be updating the entities on a separate thread, so I need to store the etag of when the entity was received so that it can be attached to the DataServiceContext on the other thread.
So far, the only method I have found is doing this on the querying DataServiceContext:
context.Entities.Single(entityDescriptor =>
entityDescriptor.Entity == entity).ETag;
I am looking for a way that could be retreived when the entity is being serialized, or something that could be more streamlined, rather than having to search through the DataServiceContext on every iteration and adding it manually.