Skip to content
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

How to use CosmosDB with Mongo Driver #10651

Closed
enisn opened this issue Nov 17, 2021 · 5 comments · Fixed by abpframework/abp-samples#105
Closed

How to use CosmosDB with Mongo Driver #10651

enisn opened this issue Nov 17, 2021 · 5 comments · Fixed by abpframework/abp-samples#105

Comments

@enisn
Copy link
Member

enisn commented Nov 17, 2021

No description provided.

@enisn
Copy link
Member Author

enisn commented Nov 18, 2021

CosmosDB has already Ef Core provider:
https://docs.microsoft.com/en-us/ef/core/providers/cosmos/?tabs=dotnet-core-cli

@enisn enisn changed the title How to use CosmosDB / Firebase How to use CosmosDB Nov 19, 2021
@enisn
Copy link
Member Author

enisn commented Nov 19, 2021

Some existing queries from modules may wont work because of dotnet/efcore#16920

@enisn enisn changed the title How to use CosmosDB How to use CosmosDB with EF Nov 19, 2021
@jhulbertpmn
Copy link

This is most definitely not as easy as switching to the cosmos efcore provider. I spent a tremendous amount of time with this on .net 5 and had issue after issue with queries in the identity server efcore project that would not translate to cosmos without major rework.
I tried this again with .net 6 and the updated cosmos efcore provider and some of the issues (like defaulting to owned entities) were handled by those updates and did not require the rework of modules that was needed previously. There were still several queries in identity and identity server I had to rewrite but I have a mostly functional instance on cosmos now.

@enisn
Copy link
Member Author

enisn commented Nov 22, 2021

New queries and repository operations are able to work properly, but some existing queries from existing modules don't work with Ef Core provider. So Entity Framework provider can wait until being mature SQL API capabilities of Cosmos.


So Mongo Driver is the best choice right now.

@enisn enisn changed the title How to use CosmosDB with EF How to use CosmosDB with Mongo Driver Nov 22, 2021
@enisn
Copy link
Member Author

enisn commented Nov 22, 2021

For Build Errors: #10705

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants