-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cosmos: FromSql support #17311
Comments
Is there a roadmap for implementing this feature? Without the ability to create custom SQL, and without for the built-in Cosmos functions (#16143), I don't believe there is any way to use EF Core if you require any built-in Cosmos DB function. |
These issues are currently in Backlog meaning that we don't have plans on working on them any time soon. Please vote 👍 on the issues important to you to help us prioritize. |
This feature is absolutely necessary. There are far too many Linq queries that can't be translated to Cosmos SQL, and there's no workaround. |
Hi @mattrozema and @thomaslevesque, I agree I would love these features but I have recently build an example app using Cosmos DB for a chapter in my book Entity Framework Core in Action, 2nd edition and I build code to do direct read/writes to the Cosmos DB Container. It takes a bit more work, but it can be done. Have a look at the BookApp.ServiceLayer.CosmosDirect.Books project and you can see some code in the Services folder that does direct reads. Also this unit test has some direct read/writes too. The GitHub repo is open-source so you can use the code in your app. Be aware the code you need is in branch PS. Not trying to sell my book - you can get what you want from the links to the code. But just so you know the chapter (16) is finished but it won't be out until (late?) January. That's because each chapter goes through at least 2 review cycles before it in the early release eBook, and about 4 more reviews before the print version. (Crazy hard work!) |
@JonPSmith thanks for the link. Sure, you can use the Cosmos DB client directly, but then you're no longer using EF Core, you're just working around it... Entities are serialized/deserialized based on the Cosmos client settings, not based on the EF Core configuration. |
Hi @thomaslevesque, Sorry, I pointed you at the direct accesses because that has the code you might need, but the actual app creates the Cosmos DB database using I then build the BookApp.ServiceLayer.CosmosDirect.Books project that I pointed to so that I could compare performance/features between EF Core's Cosmos DB access with direct access to Cosmos DB. |
I recommend this gets into the EF Core 6 list. If this is available many EF Core limitations can be worked around. NOTE: At the moment its quite hard to obtain an Cosmos |
We're still waiting for FromSqlRaw support, when are you planing to release it? |
Triage: balancing to @roji to take a stab for 6.0. |
No description provided.
The text was updated successfully, but these errors were encountered: