azure-cosmos-dotnet-repository icon indicating copy to clipboard operation
azure-cosmos-dotnet-repository copied to clipboard

POC: Handle domain object mapping with etag support

Open robennett2 opened this issue 2 years ago • 2 comments

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.

robennett2 avatar Mar 08 '22 21:03 robennett2

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?

mumby0168 avatar Mar 09 '22 20:03 mumby0168

Another thought, any reason this can't go in the main package? Microsoft.Azure.CosmosRepository

mumby0168 avatar Mar 09 '22 20:03 mumby0168

Closing all open PRs that have conflicts, build validation errors, and haven't been updated in more than a month.

IEvangelist avatar Apr 06 '23 13:04 IEvangelist