EF Core Cosmos DB with Azure Table Storage

azure azure-cosmosdb azure-table-storage entity-framework-core

Question

Since Microsoft recently have merged Azure Table Storage namespaces and api with Cosmosdb, I thought it would be possible to use Entity Framework Core Cosmos with Azure Storage Tables.. only I'm not able to provide a database name in the configuration:

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder.UseCosmos(
        "https://mystorageaccount.table.core.windows.net/",
        "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==",
        databaseName: "OrdersDB");

From: https://docs.microsoft.com/en-us/ef/core/providers/cosmos/?tabs=dotnet-core-cli

I have accountendpoint, accountkey, but not database name. You can only create tables, but I would think a database beneath is used.

Anyone know if this is possible at all?

1
0
3/3/2020 11:57:27 AM

Accepted Answer

As per the documentation here, EF Core Provider for Cosmos DB only supports SQL API only (at least as of writing this answer) and you are using it against Table Storage. That's the reason you're getting this error.

3
2/2/2020 4:08:11 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow