Skip to content

Commit

Permalink
Add [DynamicDependency] on DateOnly/TimeOnly for trimming (#27910)
Browse files Browse the repository at this point in the history
Allows SQLite to be used when trimming.

Fixes #27311
  • Loading branch information
roji authored May 6, 2022
1 parent dd243a9 commit 06a0f01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/EFCore.Relational/Query/IMethodCallTranslator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public interface IMethodCallTranslator
// This is a 6.0.x hack to make trimming work, since the linker doesn't see our GetRequiredRuntimeMethod invocations below
// (see #26288)
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(Math))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(DateOnly))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(TimeOnly))]
SqlExpression? Translate(
SqlExpression? instance,
MethodInfo method,
Expand Down

0 comments on commit 06a0f01

Please sign in to comment.