-
-
Notifications
You must be signed in to change notification settings - Fork 318
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
EFCore 6 + FromSqlRaw + UpdateFromQuery #720
Comments
Hello @itan-mcp , Thank you for reporting, we will look at this. Best Regards, Jon Sponsorship Performance Libraries Runtime Evaluation |
Hello @JonathanMagnan After quick look using with Executing Interceptor, I found that for FromSqlRaw case both UpdateFromQuery/DeleteFromQuery always add additional redundant parameter to DbCommand.Parameters with empty object array value (object[0]) which is not supported by Microsoft.Data.SqlClient. So, for now the workaround might be just to remove such parameters from collection by using Executing Interceptor, until the fix
when using only one db provider (MSSQL) it can be done without casting |
Hello @itan-mcp , At this moment, I believe you will need to keep using this workaround. We could certainly support the Since EF Core 7 is redoing that feature on their side, we will probably wait to see if it is really worth time for us to fix it or they will already handle all these kinds of case on their side. |
1. Description
When using "FromSqlRaw" to populate an entity from a derived query, a System.ArgumentException exception is thrown
EFCore: 6.0.2/6.0.1
Z.EntityFramework.Plus.EFCore: 6.13.10
Code sample:
2. Exception
4. Any further technical details
Same happens for DeleteFromQuery
The text was updated successfully, but these errors were encountered: