diff --git a/src/EFCore.Relational/Diagnostics/RelationalEventId.cs b/src/EFCore.Relational/Diagnostics/RelationalEventId.cs
index 23420f06c1b..7981a6fe119 100644
--- a/src/EFCore.Relational/Diagnostics/RelationalEventId.cs
+++ b/src/EFCore.Relational/Diagnostics/RelationalEventId.cs
@@ -65,7 +65,7 @@ private enum Id
QueryClientEvaluationWarning = CoreEventId.RelationalBaseId + 500,
QueryPossibleUnintendedUseOfEqualsWarning,
QueryPossibleExceptionWithAggregateOperatorWarning,
- ValueConversionSqlLiteralWarning,
+ ValueConversionSqlLiteralWarning, // This warning has been removed.
// Model validation events
ModelValidationKeyDefaultValueWarning = CoreEventId.RelationalBaseId + 600,
@@ -463,16 +463,6 @@ private enum Id
///
public static readonly EventId QueryPossibleExceptionWithAggregateOperatorWarning = MakeQueryId(Id.QueryPossibleExceptionWithAggregateOperatorWarning);
- ///
- ///
- /// A SQL literal is being generated for a value that is using a value conversion.
- ///
- ///
- /// This event is in the category.
- ///
- ///
- public static readonly EventId ValueConversionSqlLiteralWarning = MakeQueryId(Id.ValueConversionSqlLiteralWarning);
-
private static readonly string _validationPrefix = DbLoggerCategory.Model.Validation.Name + ".";
private static EventId MakeValidationId(Id id) => new EventId((int)id, _validationPrefix + id);
diff --git a/src/EFCore.Relational/Diagnostics/RelationalLoggerExtensions.cs b/src/EFCore.Relational/Diagnostics/RelationalLoggerExtensions.cs
index 4cd9c6a29ea..2e6021a739f 100644
--- a/src/EFCore.Relational/Diagnostics/RelationalLoggerExtensions.cs
+++ b/src/EFCore.Relational/Diagnostics/RelationalLoggerExtensions.cs
@@ -1363,48 +1363,6 @@ public static void QueryPossibleExceptionWithAggregateOperatorWarning(
}
}
- ///
- /// Logs for the event.
- ///
- /// The diagnostics logger to use.
- /// The CLR type.
- /// The value converter.
- public static void ValueConversionSqlLiteralWarning(
- [NotNull] this IDiagnosticsLogger diagnostics,
- [NotNull] Type mappingClrType,
- [NotNull] ValueConverter valueConverter)
- {
- var definition = RelationalResources.LogValueConversionSqlLiteralWarning(diagnostics);
-
- var warningBehavior = definition.GetLogBehavior(diagnostics);
- if (warningBehavior != WarningBehavior.Ignore)
- {
- definition.Log(
- diagnostics,
- warningBehavior,
- mappingClrType.ShortDisplayName(),
- valueConverter.GetType().ShortDisplayName());
- }
-
- if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name))
- {
- diagnostics.DiagnosticSource.Write(
- definition.EventId.Name,
- new ValueConverterEventData(
- definition,
- ValueConversionSqlLiteral,
- mappingClrType,
- valueConverter));
- }
- }
-
- private static string ValueConversionSqlLiteral(EventDefinitionBase definition, EventData payload)
- {
- var d = (EventDefinition