dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.77k stars 3.18k forks source link

Cosmos: CUD batching #17308

Open AndriySvyryd opened 5 years ago

AndriySvyryd commented 5 years ago

See https://github.com/Azure/azure-cosmos-dotnet-v3/blob/635cb3696490577b9fa115ec1e6f400c77c7b872/Microsoft.Azure.Cosmos.Samples/Usage/Batch/Program.cs https://docs.microsoft.com/en-us/azure/cosmos-db/transactional-batch

https://devblogs.microsoft.com/cosmosdb/introducing-bulk-support-in-the-net-sdk/ https://devblogs.microsoft.com/cosmosdb/bulk-updates-with-optimistic-concurrency-control/

vyarymovych commented 2 years ago

Are there any updates? Is it possible to persist a couple of cosmos documents in one transaction using EF Core Cosmos provider?

roji commented 2 years ago

@vyarymovych this issue is in the backlog, which means it's not currently in the plan for EF Core 7.0 - please vote (:+1:) for it on the top comment, that helps us prioritize work.

PaulOst commented 2 years ago

My feedback is that such a basic database feature, transactions, should not be in a backlog but planned for EF Core 7.0. Please reconsider. We can't use EF Core 7.0 on our projects without this capability.

shanerogers commented 2 years ago

We need this feature as well. The only way forward is to do state changes in our application with the CosmosClient with batches. Possibly use EF core to write queries, so we can leverage LINQ.

rafalxyz commented 1 year ago

Could this be prioritized please? The Cosmos provider is useless without such a basic feature. What's the point of using EF over Cosmos SDK without this feature?

roji commented 1 year ago

@rafalxyz there are many reasons to use the EF provider - change tracking, optimistic concurrency, etc. For now this is in the backlog, as it gets more votes we'll consider it when planning for new features.

rafalxyz commented 1 year ago

@roji I'm sorry for that comment. I've just used the EF provider in the latest commercial project and encountered so many bugs and missing features. Change tracking didn't work as expected either. I'll create an issue with everything that is missing or can be improved.