I am trying to do a basic question-answer web app without authentication by using ASP.Net5 MVC and Cosmos DB. I am able to do CRUD on question model. I guess I should do with 2 containers and Join operation but I can't include the other container. Here is my appsetting.json
"CosmosDb": {
"Account": "",
"Key": "",
"DatabaseName": "ToDoList",
"ContainerName": "Items"
}
CodePudding user response:
There is no possibility to do joins between containers in CosmosDB
Azure Cosmos DB’s JOIN supports intra-document and self-joins. Azure Cosmos DB does not support JOINs across documents or containers.
If you want to join data you have to eighter store both types of data in one container with a good partitioning strategy.
Second option is to read data from one and read from the other collection and then do joins in memory.