Accessing Cosmos SQL API DB using .NET Sdk of Table API

suvra jyoti 151 Reputation points
2022-08-30T12:45:20.817+00:00

We have a legacy application whose database is Azure Cosmos DB SQL API database. The application code is accessing the same using the .net SDKs for Table APIs (Microsoft.Azure.Cosmos.Table/Azure.Data.Tables). Initially there was Azure Table Storage that was being used and then later migration happened to Azure cosmos Table API. Then due to some security issues it had to be converted to Azure Cosmos DB SQL API database but the application code was not changed to use Microsoft.Azure.Cosmos(.net sdk for SQL API). Are there any concerns with this as there is currently no issues. ?

connection string : DefaultEndpointsProtocol=https;AccountName={ACCOUNT_NAME};AccountKey={ACCOUNT_KEY};TableEndpoint=https://{ACCOUNT_NAME}.table.cosmos.azure.com:443/;

Below are some of the links that suggest that it is recommended to use the same API in client code as in the backend:

https://learn.microsoft.com/en-us/azure/cosmos-db/faq#can-i-use-multiple-apis-to-access-my-data-:~:text=Can%20I%20use%20multiple%20APIs%20to%20access%20my%20data%3F

https://stackoverflow.com/questions/60057155/how-to-connect-azure-cosmos-db-with-dual-apis-sql-and-mongo

Also is there any performance gain that is going to happen if we use the Microsoft.Azure.Cosmos sdk of SQL APIs in application code. Is there some documentation around the same? It is an important consideration since there a quite an amount of code rewrite that will need to be taken up.

Thanks

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,439 questions
{count} votes