-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for TransactionalBatch #151
Comments
Hi @catsburg, this is certainly a part of our plans myself & @IEvangelist where just chatting about it the other day. It might be required that we inject something other than |
Having a look at this and found this example, the question here is how can we make this API they already offer easier to use, just an open question, see here. |
@mumby0168 Glad to hear that it's part of your plans! Just to share some thoughts on this:
Hope this is useful! Pretty cool project you guys have, but unfortunately since we require transactions, we're not going to use it for now, and create our own Repositories instead . |
A transactional batch that supports multiple item types might allow this library to be used to follow the Transactional Outbox pattern described here, though it might be a little difficult modelling this with the current https://learn.microsoft.com/en-us/azure/architecture/databases/guide/transactional-outbox-cosmos |
The repositories currently don't offer support for transactions (using TransactionalBatch), for use cases where a bunch of CRUD actions have to all succeed/fail together. If transactions are required, the only solution now is to implement a custom Repository, which kind of defeats the purpose of using this library.
It would be cool to be able to do something along the lines of:
await _repository.Batch(partitionKey).Create(item1).Replace(item2.Id, item2).ExecuteAsync();
The text was updated successfully, but these errors were encountered: