diff --git a/src/EFCore.Relational/Query/IMethodCallTranslator.cs b/src/EFCore.Relational/Query/IMethodCallTranslator.cs index b6e2ecebe74..b7c0f1f1601 100644 --- a/src/EFCore.Relational/Query/IMethodCallTranslator.cs +++ b/src/EFCore.Relational/Query/IMethodCallTranslator.cs @@ -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,