/// <summary> /// Logs for the <see cref="RelationalEventId.MultipleCollectionIncludeWarning" /> event. /// </summary> /// <param name="diagnostics"> The diagnostics logger to use. </param> public static void SavepointsDisabledBecauseOfMARS( [NotNull] this IDiagnosticsLogger <DbLoggerCategory.Database.Transaction> diagnostics) { var definition = SqlServerResources.LogSavepointsDisabledBecauseOfMARS(diagnostics); if (diagnostics.ShouldLog(definition)) { definition.Log(diagnostics); } if (diagnostics.NeedsEventData(definition, out var diagnosticSourceEnabled, out var simpleLogEnabled)) { var eventData = new EventData( definition, (d, p) => ((EventDefinition)d).GenerateMessage()); diagnostics.DispatchEventData(definition, eventData, diagnosticSourceEnabled, simpleLogEnabled); } }