-
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
Fix to #33678 - TimeOnly.FromDateTime() could not be translated in EF Core 8 #33689
Conversation
9c66372
to
6a78b92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"using ExpressionExtensions = Microsoft.EntityFrameworkCore.Query.ExpressionExtensions;"
- is that needed?
@ErikEJ ExpressionExtensions that's used to access InferTypeMapping call is ambiguous otherwise |
… Core 8 Adding translation for TimeOnly.FromDateTime and TimeOnly.FromTimeSpan. We already had support for DateOnly.FromDateTime. Fixes #33678
|
||
if ((method == FromDateTime || method == FromTimeSpan) | ||
&& instance is null | ||
&& arguments.Count == 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this sufficiently resilient? What if another overload is added with one parameter? Check for the parameter type as well to be sure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetRuntimeMethod already checks parameter type
Hi Team, I encountered a problem using the FromDateTime method with EFCore 8 (version 8.0.6). Could you please let me know if this fix will be ported to EFCore 8? Thank you for your assistance. |
@DmitryGaravsky This issue doesn't meet the bar for patching. See the planning process for more info. |
Adding translation for TimeOnly.FromDateTime and TimeOnly.FromTimeSpan. We already had support for DateOnly.FromDateTime.
Fixes #33678