diff --git a/src/EFCore.Relational/Query/IMethodCallTranslator.cs b/src/EFCore.Relational/Query/IMethodCallTranslator.cs
index 0f815b4edab..b6e2ecebe74 100644
--- a/src/EFCore.Relational/Query/IMethodCallTranslator.cs
+++ b/src/EFCore.Relational/Query/IMethodCallTranslator.cs
@@ -1,7 +1,9 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+using System;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using System.Linq.Expressions;
using System.Reflection;
using Microsoft.EntityFrameworkCore.Diagnostics;
@@ -28,6 +30,9 @@ public interface IMethodCallTranslator
/// SQL representations of .
/// The query logger to use.
/// A SQL translation of the .
+ // 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))]
SqlExpression? Translate(
SqlExpression? instance,
MethodInfo method,