azure-cosmos-dotnet-repository
azure-cosmos-dotnet-repository copied to clipboard
POC: Handle domain object mapping with etag support
When following a clean architecture, seperating cosmos items and domain entities, it is difficult to manage etags correctly, especially without "dirtying" the domain layer with a property to store the etag. A solution to this is to create a repository that is designed to get and map your item directly to the domain object whilst storing the etag so any update actions can use that etag. This allows the user to keep the domain layer clean from the etag whilst still providing the benefits.
Just thinking as well, do we provide this without etags? The mapping idea is quite neat? i.e. you don't want to cache the etags?
Another thought, any reason this can't go in the main package? Microsoft.Azure.CosmosRepository
Closing all open PRs that have conflicts, build validation errors, and haven't been updated in more than a month.