diff --git a/src/EFCore/Extensions/ConventionAnnotatableExtensions.cs b/src/EFCore/Extensions/ConventionAnnotatableExtensions.cs index 9969217132c..9a1fb0b5198 100644 --- a/src/EFCore/Extensions/ConventionAnnotatableExtensions.cs +++ b/src/EFCore/Extensions/ConventionAnnotatableExtensions.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Metadata.Internal; // ReSharper disable once CheckNamespace namespace Microsoft.EntityFrameworkCore diff --git a/src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs b/src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs index 9bea35a3136..fac9563ccfe 100644 --- a/src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs +++ b/src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs @@ -33,6 +33,9 @@ public static class EntityFrameworkQueryableExtensions /// This is only typically supported by queries generated by Entity Framework Core. /// /// + /// + /// For more information, see Viewing SQL generated by EF Core. + /// /// The query source. /// The query string for debugging. /// is . @@ -51,8 +54,14 @@ public static string ToQueryString(this IQueryable source) /// Asynchronously determines whether a sequence contains any elements. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to check for being empty. @@ -76,8 +85,14 @@ public static Task AnyAsync( /// Asynchronously determines whether any element of a sequence satisfies a condition. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An whose elements to test for a condition. @@ -107,8 +122,14 @@ public static Task AnyAsync( /// Asynchronously determines whether all the elements of a sequence satisfy a condition. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An whose elements to test for a condition. @@ -142,8 +163,14 @@ public static Task AllAsync( /// Asynchronously returns the number of elements in a sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An that contains the elements to be counted. @@ -167,8 +194,14 @@ public static Task CountAsync( /// Asynchronously returns the number of elements in a sequence that satisfy a condition. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An that contains the elements to be counted. @@ -198,8 +231,14 @@ public static Task CountAsync( /// Asynchronously returns a that represents the total number of elements in a sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An that contains the elements to be counted. @@ -224,8 +263,14 @@ public static Task LongCountAsync( /// that satisfy a condition. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An that contains the elements to be counted. @@ -259,8 +304,14 @@ public static Task LongCountAsync( /// Asynchronously returns the first element of a sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to return the first element of. @@ -285,8 +336,14 @@ public static Task FirstAsync( /// Asynchronously returns the first element of a sequence that satisfies a specified condition. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to return the first element of. @@ -327,8 +384,14 @@ public static Task FirstAsync( /// Asynchronously returns the first element of a sequence, or a default value if the sequence contains no elements. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to return the first element of. @@ -354,8 +417,14 @@ public static Task FirstAsync( /// or a default value if no such element is found. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to return the first element of. @@ -390,8 +459,14 @@ public static Task FirstAsync( /// Asynchronously returns the last element of a sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to return the last element of. @@ -416,8 +491,14 @@ public static Task LastAsync( /// Asynchronously returns the last element of a sequence that satisfies a specified condition. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to return the last element of. @@ -458,8 +539,14 @@ public static Task LastAsync( /// Asynchronously returns the last element of a sequence, or a default value if the sequence contains no elements. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to return the last element of. @@ -485,8 +572,14 @@ public static Task LastAsync( /// or a default value if no such element is found. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to return the last element of. @@ -522,8 +615,14 @@ public static Task LastAsync( /// if there is not exactly one element in the sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to return the single element of. @@ -559,8 +658,14 @@ public static Task SingleAsync( /// and throws an exception if more than one such element exists. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to return the single element of. @@ -608,8 +713,14 @@ public static Task SingleAsync( /// this method throws an exception if there is more than one element in the sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to return the single element of. @@ -638,8 +749,14 @@ public static Task SingleAsync( /// satisfies the condition. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to return the single element of. @@ -677,8 +794,14 @@ public static Task SingleAsync( /// Asynchronously returns the minimum value of a sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An that contains the elements to determine the minimum of. @@ -703,8 +826,14 @@ public static Task MinAsync( /// Asynchronously invokes a projection function on each element of a sequence and returns the minimum resulting value. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// @@ -741,8 +870,14 @@ public static Task MinAsync( /// Asynchronously returns the maximum value of a sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An that contains the elements to determine the maximum of. @@ -767,8 +902,14 @@ public static Task MaxAsync( /// Asynchronously invokes a projection function on each element of a sequence and returns the maximum resulting value. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// @@ -805,8 +946,14 @@ public static Task MaxAsync( /// Asynchronously computes the sum of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the sum of. /// A to observe while waiting for the task to complete. @@ -829,8 +976,14 @@ public static Task SumAsync( /// Asynchronously computes the sum of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the sum of. /// A to observe while waiting for the task to complete. @@ -855,8 +1008,14 @@ public static Task SumAsync( /// each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values of type . /// A projection function to apply to each element. @@ -886,8 +1045,14 @@ public static Task SumAsync( /// each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values of type . /// A projection function to apply to each element. @@ -916,8 +1081,14 @@ public static Task SumAsync( /// Asynchronously computes the sum of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the sum of. /// A to observe while waiting for the task to complete. @@ -940,8 +1111,14 @@ public static Task SumAsync( /// Asynchronously computes the sum of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the sum of. /// A to observe while waiting for the task to complete. @@ -965,8 +1142,14 @@ public static Task SumAsync( /// each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values of type . /// A projection function to apply to each element. @@ -995,8 +1178,14 @@ public static Task SumAsync( /// each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values of type . /// A projection function to apply to each element. @@ -1025,8 +1214,14 @@ public static Task SumAsync( /// Asynchronously computes the sum of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the sum of. /// A to observe while waiting for the task to complete. @@ -1049,8 +1244,14 @@ public static Task SumAsync( /// Asynchronously computes the sum of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the sum of. /// A to observe while waiting for the task to complete. @@ -1074,8 +1275,14 @@ public static Task SumAsync( /// each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values of type . /// A projection function to apply to each element. @@ -1105,8 +1312,14 @@ public static Task SumAsync( /// each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values of type . /// A projection function to apply to each element. @@ -1135,8 +1348,14 @@ public static Task SumAsync( /// Asynchronously computes the sum of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the sum of. /// A to observe while waiting for the task to complete. @@ -1159,8 +1378,14 @@ public static Task SumAsync( /// Asynchronously computes the sum of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the sum of. /// A to observe while waiting for the task to complete. @@ -1184,8 +1409,14 @@ public static Task SumAsync( /// each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values of type . /// A projection function to apply to each element. @@ -1215,8 +1446,14 @@ public static Task SumAsync( /// each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values of type . /// A projection function to apply to each element. @@ -1245,8 +1482,14 @@ public static Task SumAsync( /// Asynchronously computes the sum of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the sum of. /// A to observe while waiting for the task to complete. @@ -1269,8 +1512,14 @@ public static Task SumAsync( /// Asynchronously computes the sum of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the sum of. /// A to observe while waiting for the task to complete. @@ -1294,8 +1543,14 @@ public static Task SumAsync( /// each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values of type . /// A projection function to apply to each element. @@ -1325,8 +1580,14 @@ public static Task SumAsync( /// each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values of type . /// A projection function to apply to each element. @@ -1359,8 +1620,14 @@ public static Task SumAsync( /// Asynchronously computes the average of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the average of. /// A to observe while waiting for the task to complete. @@ -1385,8 +1652,14 @@ public static Task AverageAsync( /// Asynchronously computes the average of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the average of. /// A to observe while waiting for the task to complete. @@ -1411,8 +1684,14 @@ public static Task AverageAsync( /// by invoking a projection function on each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// A sequence of values of type . @@ -1444,8 +1723,14 @@ public static Task AverageAsync( /// by invoking a projection function on each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// A sequence of values of type . @@ -1475,8 +1760,14 @@ public static Task AverageAsync( /// Asynchronously computes the average of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the average of. /// A to observe while waiting for the task to complete. @@ -1500,8 +1791,14 @@ public static Task AverageAsync( /// Asynchronously computes the average of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the average of. /// A to observe while waiting for the task to complete. @@ -1525,8 +1822,14 @@ public static Task AverageAsync( /// by invoking a projection function on each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// A sequence of values of type . @@ -1558,8 +1861,14 @@ public static Task AverageAsync( /// by invoking a projection function on each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// A sequence of values of type . @@ -1589,8 +1898,14 @@ public static Task AverageAsync( /// Asynchronously computes the average of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the average of. /// A to observe while waiting for the task to complete. @@ -1614,8 +1929,14 @@ public static Task AverageAsync( /// Asynchronously computes the average of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the average of. /// A to observe while waiting for the task to complete. @@ -1639,8 +1960,14 @@ public static Task AverageAsync( /// by invoking a projection function on each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// A sequence of values of type . @@ -1672,8 +1999,14 @@ public static Task AverageAsync( /// by invoking a projection function on each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// A sequence of values of type . @@ -1703,8 +2036,14 @@ public static Task AverageAsync( /// Asynchronously computes the average of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the average of. /// A to observe while waiting for the task to complete. @@ -1729,8 +2068,14 @@ public static Task AverageAsync( /// Asynchronously computes the average of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the average of. /// A to observe while waiting for the task to complete. @@ -1755,8 +2100,14 @@ public static Task AverageAsync( /// by invoking a projection function on each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// A sequence of values of type . @@ -1788,8 +2139,14 @@ public static Task AverageAsync( /// by invoking a projection function on each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// A sequence of values of type . @@ -1819,8 +2176,14 @@ public static Task AverageAsync( /// Asynchronously computes the average of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the average of. /// A to observe while waiting for the task to complete. @@ -1844,8 +2207,14 @@ public static Task AverageAsync( /// Asynchronously computes the average of a sequence of values. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// A sequence of values to calculate the average of. /// A to observe while waiting for the task to complete. @@ -1870,8 +2239,14 @@ public static Task AverageAsync( /// by invoking a projection function on each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// A sequence of values of type . @@ -1903,8 +2278,14 @@ public static Task AverageAsync( /// by invoking a projection function on each element of the input sequence. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// A sequence of values of type . @@ -1938,8 +2319,14 @@ public static Task AverageAsync( /// Asynchronously determines whether a sequence contains a specified element by using the default equality comparer. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to return the single element of. @@ -1975,8 +2362,14 @@ public static Task ContainsAsync( /// asynchronously. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to create a list from. @@ -2004,8 +2397,14 @@ public static async Task> ToListAsync( /// Asynchronously creates an array from an by enumerating it asynchronously. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to create an array from. @@ -2051,6 +2450,9 @@ internal static readonly MethodInfo NotQuiteIncludeMethodInfo /// cref="ThenInclude{TEntity, TPreviousProperty, TProperty}(IIncludableQueryable{TEntity, IEnumerable{TPreviousProperty}}, Expression{Func{TPreviousProperty, TProperty}})" /> /// after this call. /// + /// + /// For more information, Loading related entities. + /// /// /// /// The following query shows including a single level of related entities: @@ -2146,6 +2548,9 @@ internal static readonly MethodInfo ThenIncludeAfterReferenceMethodInfo /// /// Specifies additional related data to be further included based on a related type that was just included. /// + /// + /// For more information, Loading related entities. + /// /// /// /// The following query shows including a single level of related entities: @@ -2202,6 +2607,9 @@ source.Provider is EntityQueryProvider /// /// Specifies additional related data to be further included based on a related type that was just included. /// + /// + /// For more information, Loading related entities. + /// /// /// /// The following query shows including a single level of related entities: @@ -2291,6 +2699,9 @@ internal static readonly MethodInfo StringIncludeMethodInfo /// specified starting with the type of entity being queried (). Further /// navigation properties to be included can be appended, separated by the '.' character. /// + /// + /// For more information, Loading related entities. + /// /// /// /// The following query shows including a single level of related entities: @@ -2347,6 +2758,9 @@ internal static readonly MethodInfo IgnoreAutoIncludesMethodInfo /// /// Specifies that the current Entity Framework LINQ query should not have any model-level eager loaded navigations applied. /// + /// + /// For more information, Loading related entities. + /// /// The type of entity being queried. /// The source query. /// A new query that will not apply any model-level eager loaded navigations. @@ -2377,6 +2791,9 @@ internal static readonly MethodInfo IgnoreQueryFiltersMethodInfo /// /// Specifies that the current Entity Framework LINQ query should not have any model-level entity query filters applied. /// + /// + /// For more information, EF Core query filters. + /// /// The type of entity being queried. /// The source query. /// A new query that will not apply any model-level entity query filters. @@ -2425,6 +2842,9 @@ internal static readonly MethodInfo AsNoTrackingMethodInfo /// The default tracking behavior for queries can be controlled by . /// /// + /// + /// For more information, see No-tracking queries in EF Core. + /// /// The type of entity being queried. /// The source query. /// A new query where the result set will not be tracked by the context. @@ -2469,6 +2889,9 @@ internal static readonly MethodInfo AsNoTrackingWithIdentityResolutionMethodInfo /// The default tracking behavior for queries can be controlled by . /// /// + /// + /// For more information, see No-tracking queries in EF Core. + /// /// The type of entity being queried. /// The source query. /// A new query where the result set will not be tracked by the context. @@ -2505,6 +2928,9 @@ internal static readonly MethodInfo AsTrackingMethodInfo /// The default tracking behavior for queries can be controlled by . /// /// + /// + /// For more information, see Tracking queries in EF Core. + /// /// The type of entity being queried. /// The source query. /// A new query where the result set will be tracked by the context. @@ -2544,6 +2970,9 @@ source.Provider is EntityQueryProvider /// The default tracking behavior for queries can be controlled by . /// /// + /// + /// For more information, see Tracking queries in EF Core. + /// /// The type of entity being queried. /// The source query. /// Indicates whether the query will track results or not. @@ -2577,6 +3006,9 @@ internal static readonly MethodInfo TagWithCallSiteMethodInfo /// Adds a tag to the collection of tags associated with an EF LINQ query. Tags are query annotations /// that can provide contextual tracing information at different points in the query pipeline. /// + /// + /// For more information, see Tagging queries in EF Core. + /// /// The type of entity being queried. /// The source query. /// The tag. @@ -2607,6 +3039,9 @@ source.Provider is EntityQueryProvider /// Adds a tag to the collection of tags associated with an EF LINQ query with source file name and line /// where method was called that can provide contextual tracing information at different points in the query pipeline. /// + /// + /// For more information, see Tagging queries in EF Core. + /// /// The type of entity being queried. /// The source query. /// The file name where the method was called @@ -2643,6 +3078,9 @@ source.Provider is EntityQueryProvider /// be loaded into the associated context. This is equivalent to calling ToList /// and then throwing away the list (without the overhead of actually creating the list). /// + /// + /// For more information, LINQ queries in EF Core. + /// /// The source query. /// is . public static void Load(this IQueryable source) @@ -2660,6 +3098,16 @@ public static void Load(this IQueryable source) /// be loaded into the associated context. This is equivalent to calling ToList /// and then throwing away the list (without the overhead of actually creating the list). /// + /// + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// + /// /// The source query. /// A to observe while waiting for the task to complete. /// A task that represents the asynchronous operation. @@ -2689,8 +3137,14 @@ public static async Task LoadAsync( /// according to a specified key selector function. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// The type of the key returned by . @@ -2718,8 +3172,14 @@ public static Task> ToDictionaryAsync( /// according to a specified key selector function and a comparer. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// The type of the key returned by . @@ -2749,8 +3209,14 @@ public static Task> ToDictionaryAsync( /// according to a specified key selector and an element selector function. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// The type of the key returned by . @@ -2782,8 +3248,14 @@ public static Task> ToDictionaryAsync /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// The type of the key returned by . @@ -2831,8 +3303,14 @@ public static async Task> ToDictionaryAsync /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to enumerate. @@ -2864,8 +3342,14 @@ public static async Task ForEachAsync( /// Returns an which can be enumerated asynchronously. /// /// - /// Multiple active operations on the same context instance are not supported. Use to ensure - /// that any asynchronous operations have completed before calling another method on this context. + /// + /// Multiple active operations on the same context instance are not supported. Use to ensure + /// that any asynchronous operations have completed before calling another method on this context. + /// See https://aka.ms/efcore-docs-threading for more information. + /// + /// + /// For more information, see Querying data with EF Core. + /// /// /// The type of the elements of . /// An to enumerate. diff --git a/src/EFCore/Extensions/MutableAnnotatableExtensions.cs b/src/EFCore/Extensions/MutableAnnotatableExtensions.cs index 67a6df03d2d..0ee8793df3f 100644 --- a/src/EFCore/Extensions/MutableAnnotatableExtensions.cs +++ b/src/EFCore/Extensions/MutableAnnotatableExtensions.cs @@ -2,10 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Metadata.Internal; // ReSharper disable once CheckNamespace namespace Microsoft.EntityFrameworkCore diff --git a/src/EFCore/Extensions/TransactionsDatabaseFacadeExtensions.cs b/src/EFCore/Extensions/TransactionsDatabaseFacadeExtensions.cs index ba64f82d9de..fc68262d7e2 100644 --- a/src/EFCore/Extensions/TransactionsDatabaseFacadeExtensions.cs +++ b/src/EFCore/Extensions/TransactionsDatabaseFacadeExtensions.cs @@ -19,6 +19,9 @@ public static class TransactionsDatabaseFacadeExtensions /// /// Specifies an existing to be used for database operations. /// + /// + /// For more information, see Transactions in EF Core. + /// /// The for the context. /// The transaction to be used. public static void EnlistTransaction(this DatabaseFacade databaseFacade, Transaction? transaction) @@ -38,6 +41,9 @@ public static void EnlistTransaction(this DatabaseFacade databaseFacade, Transac /// /// Returns the currently enlisted transaction. /// + /// + /// For more information, see Transactions in EF Core. + /// /// The for the context. /// The currently enlisted transaction. public static Transaction? GetEnlistedTransaction(this DatabaseFacade databaseFacade) diff --git a/src/EFCore/Infrastructure/AccessorExtensions.cs b/src/EFCore/Infrastructure/AccessorExtensions.cs index 6d8af8aae2b..ff811a1e4ca 100644 --- a/src/EFCore/Infrastructure/AccessorExtensions.cs +++ b/src/EFCore/Infrastructure/AccessorExtensions.cs @@ -29,14 +29,13 @@ public static class AccessorExtensions /// . /// /// - /// This method is typically used by database providers (and other extensions). It is generally - /// not used in application code. - /// - /// /// is used to hide properties that are not intended to be used in /// application code but can be used in extension methods written by database providers etc. /// /// + /// + /// For more information, Accessing DbContext services. + /// /// The type of service to be resolved. /// The object exposing the service provider. /// The requested service. diff --git a/src/EFCore/Infrastructure/Annotatable.cs b/src/EFCore/Infrastructure/Annotatable.cs index 5070ae32807..3a3271f586a 100644 --- a/src/EFCore/Infrastructure/Annotatable.cs +++ b/src/EFCore/Infrastructure/Annotatable.cs @@ -17,6 +17,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public class Annotatable : AnnotatableBase, IMutableAnnotatable { /// diff --git a/src/EFCore/Infrastructure/AnnotatableBase.cs b/src/EFCore/Infrastructure/AnnotatableBase.cs index d28d539627c..650a85c05f9 100644 --- a/src/EFCore/Infrastructure/AnnotatableBase.cs +++ b/src/EFCore/Infrastructure/AnnotatableBase.cs @@ -21,6 +21,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public class AnnotatableBase : IAnnotatable { private SortedDictionary? _annotations; diff --git a/src/EFCore/Infrastructure/AnnotatableBuilder.cs b/src/EFCore/Infrastructure/AnnotatableBuilder.cs index 491c36a667d..47a189f0f58 100644 --- a/src/EFCore/Infrastructure/AnnotatableBuilder.cs +++ b/src/EFCore/Infrastructure/AnnotatableBuilder.cs @@ -17,6 +17,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// [DebuggerDisplay("Builder {" + nameof(Metadata) + ",nq}")] public abstract class AnnotatableBuilder : IConventionAnnotatableBuilder where TMetadata : ConventionAnnotatable diff --git a/src/EFCore/Infrastructure/Annotation.cs b/src/EFCore/Infrastructure/Annotation.cs index e592023ca94..75a155cf122 100644 --- a/src/EFCore/Infrastructure/Annotation.cs +++ b/src/EFCore/Infrastructure/Annotation.cs @@ -14,6 +14,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public class Annotation : IAnnotation { /// diff --git a/src/EFCore/Infrastructure/ConcurrencyDetectorCriticalSectionDisposer.cs b/src/EFCore/Infrastructure/ConcurrencyDetectorCriticalSectionDisposer.cs index cfa301a8ec8..214160ee32b 100644 --- a/src/EFCore/Infrastructure/ConcurrencyDetectorCriticalSectionDisposer.cs +++ b/src/EFCore/Infrastructure/ConcurrencyDetectorCriticalSectionDisposer.cs @@ -9,6 +9,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// A returned by an , which will exit the ongoing /// critical section when disposed. /// + /// + /// For more information, Implementation of database providers and extensions. + /// public readonly struct ConcurrencyDetectorCriticalSectionDisposer : IDisposable { private readonly IConcurrencyDetector _concurrencyDetector; diff --git a/src/EFCore/Infrastructure/ConventionAnnotatable.cs b/src/EFCore/Infrastructure/ConventionAnnotatable.cs index 16d9b914f9f..268a198c95a 100644 --- a/src/EFCore/Infrastructure/ConventionAnnotatable.cs +++ b/src/EFCore/Infrastructure/ConventionAnnotatable.cs @@ -20,6 +20,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public abstract class ConventionAnnotatable : Annotatable, IConventionAnnotatable, IMutableAnnotatable { /// diff --git a/src/EFCore/Infrastructure/CoreOptionsExtension.cs b/src/EFCore/Infrastructure/CoreOptionsExtension.cs index 57947ff4e9e..2350bfe4626 100644 --- a/src/EFCore/Infrastructure/CoreOptionsExtension.cs +++ b/src/EFCore/Infrastructure/CoreOptionsExtension.cs @@ -25,6 +25,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// methods to obtain a new instance with the option changed. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public class CoreOptionsExtension : IDbContextOptionsExtension { private IServiceProvider? _internalServiceProvider; diff --git a/src/EFCore/Infrastructure/DatabaseFacade.cs b/src/EFCore/Infrastructure/DatabaseFacade.cs index 35bb5d5cd9e..a50162a6abe 100644 --- a/src/EFCore/Infrastructure/DatabaseFacade.cs +++ b/src/EFCore/Infrastructure/DatabaseFacade.cs @@ -74,6 +74,10 @@ private IDatabaseFacadeDependencies Dependencies /// to ensure the database is created using migrations and that all migrations have been applied. /// /// + /// + /// For more information, Managing database schemas with EF Core + /// and Database creation APIs. + /// /// if the database is created, if it already existed. public virtual bool EnsureCreated() => Dependencies.DatabaseCreator.EnsureCreated(); @@ -114,6 +118,10 @@ public virtual bool EnsureCreated() /// to ensure the database is created using migrations and that all migrations have been applied. /// /// + /// + /// For more information, Managing database schemas with EF Core + /// and Database creation APIs. + /// /// A to observe while waiting for the task to complete. /// /// A task that represents the asynchronous save operation. The task result contains if the database is created, @@ -138,6 +146,10 @@ public virtual Task EnsureCreatedAsync(CancellationToken cancellationToken /// execution of the test/prototype. Note, however, that data in the database is not preserved. /// /// + /// + /// For more information, Managing database schemas with EF Core + /// and Database creation APIs. + /// /// if the database is deleted, if it did not exist. public virtual bool EnsureDeleted() => Dependencies.DatabaseCreator.EnsureDeleted(); @@ -157,6 +169,10 @@ public virtual bool EnsureDeleted() /// execution of the test/prototype. Note, however, that data in the database is not preserved. /// /// + /// + /// For more information, Managing database schemas with EF Core + /// and Database creation APIs. + /// /// A to observe while waiting for the task to complete. /// /// A task that represents the asynchronous save operation. The task result contains if the database is deleted, @@ -182,6 +198,9 @@ public virtual Task EnsureDeletedAsync(CancellationToken cancellationToken /// up-to-date with regard to schema creation, etc. /// /// + /// + /// For more information, Database connections in EF Core. + /// /// if the database is available; otherwise. public virtual bool CanConnect() => Dependencies.DatabaseCreator.CanConnect(); @@ -202,6 +221,9 @@ public virtual bool CanConnect() /// up-to-date with regard to schema creation, etc. /// /// + /// + /// For more information, Database connections in EF Core. + /// /// A to observe while waiting for the task to complete. /// if the database is available; otherwise. /// If the is canceled. @@ -211,6 +233,9 @@ public virtual Task CanConnectAsync(CancellationToken cancellationToken = /// /// Starts a new transaction. /// + /// + /// For more information, see Transactions in EF Core. + /// /// /// A that represents the started transaction. /// @@ -220,6 +245,9 @@ public virtual IDbContextTransaction BeginTransaction() /// /// Asynchronously starts a new transaction. /// + /// + /// For more information, see Transactions in EF Core. + /// /// A to observe while waiting for the task to complete. /// /// A task that represents the asynchronous transaction initialization. The task result contains a @@ -238,6 +266,9 @@ public virtual void CommitTransaction() /// /// Applies the outstanding operations in the current transaction to the database. /// + /// + /// For more information, see Transactions in EF Core. + /// /// A to observe while waiting for the task to complete. /// A Task representing the asynchronous operation. /// If the is canceled. @@ -247,12 +278,18 @@ public virtual Task CommitTransactionAsync(CancellationToken cancellationToken = /// /// Discards the outstanding operations in the current transaction. /// + /// + /// For more information, see Transactions in EF Core. + /// public virtual void RollbackTransaction() => Dependencies.TransactionManager.RollbackTransaction(); /// /// Discards the outstanding operations in the current transaction. /// + /// + /// For more information, see Transactions in EF Core. + /// /// A to observe while waiting for the task to complete. /// A Task representing the asynchronous operation. /// If the is canceled. @@ -262,6 +299,9 @@ public virtual Task RollbackTransactionAsync(CancellationToken cancellationToken /// /// Creates an instance of the configured . /// + /// + /// For more information, see EF Core Connection Resiliency. + /// /// An instance. public virtual IExecutionStrategy CreateExecutionStrategy() => Dependencies.ExecutionStrategyFactory.Create(); @@ -284,6 +324,9 @@ public virtual IExecutionStrategy CreateExecutionStrategy() /// on the returned . /// /// + /// + /// For more information, see Transactions in EF Core. + /// public virtual IDbContextTransaction? CurrentTransaction => Dependencies.TransactionManager.CurrentTransaction; @@ -306,6 +349,9 @@ public virtual IDbContextTransaction? CurrentTransaction /// could be left in a corrupted state if fails. /// /// + /// + /// For more information, see Transactions in EF Core. + /// public virtual bool AutoTransactionsEnabled { get; set; } = true; /// @@ -323,6 +369,9 @@ public virtual IDbContextTransaction? CurrentTransaction /// corrupted state if fails. /// /// + /// + /// For more information, see Transactions in EF Core. + /// public virtual bool AutoSavepointsEnabled { get; set; } = true; /// @@ -340,6 +389,10 @@ public virtual IDbContextTransaction? CurrentTransaction /// provider to use as part of configuring the context. /// /// + /// + /// For more information, + /// DbContext lifetime, configuration, and initialization. + /// public virtual string? ProviderName // Needs to be lazy because used from OnModelCreating => _context.GetService>() @@ -355,6 +408,9 @@ public virtual string? ProviderName /// not directly exposed in the public API surface. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// IServiceProvider IInfrastructure.Instance => ((IInfrastructure)_context).Instance; diff --git a/src/EFCore/Infrastructure/DbContextAttribute.cs b/src/EFCore/Infrastructure/DbContextAttribute.cs index 354d8831183..cdcb59e09dd 100644 --- a/src/EFCore/Infrastructure/DbContextAttribute.cs +++ b/src/EFCore/Infrastructure/DbContextAttribute.cs @@ -10,6 +10,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// Identifies the that a class belongs to. For example, this attribute is used /// to identify which context a migration applies to. /// + /// + /// For more information, Managing database schemas with EF Cor. + /// [AttributeUsage(AttributeTargets.Class)] public sealed class DbContextAttribute : Attribute { diff --git a/src/EFCore/Infrastructure/DbContextOptionsExtensionInfo.cs b/src/EFCore/Infrastructure/DbContextOptionsExtensionInfo.cs index 3b61800777c..ff3262dc71a 100644 --- a/src/EFCore/Infrastructure/DbContextOptionsExtensionInfo.cs +++ b/src/EFCore/Infrastructure/DbContextOptionsExtensionInfo.cs @@ -10,12 +10,18 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// /// Information/metadata for an . /// + /// + /// For more information, Implementation of database providers and extensions. + /// public abstract class DbContextOptionsExtensionInfo { /// /// Creates a new instance containing /// info/metadata for the given extension. /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// The extension. protected DbContextOptionsExtensionInfo(IDbContextOptionsExtension extension) { @@ -27,17 +33,26 @@ protected DbContextOptionsExtensionInfo(IDbContextOptionsExtension extension) /// /// The extension for which this instance contains metadata. /// + /// + /// For more information, Implementation of database providers and extensions. + /// public virtual IDbContextOptionsExtension Extension { get; } /// /// if the extension is a database provider; otherwise. /// + /// + /// For more information, Implementation of database providers and extensions. + /// public abstract bool IsDatabaseProvider { get; } /// /// A message fragment for logging typically containing information about /// any useful non-default options that have been configured. /// + /// + /// For more information, Implementation of database providers and extensions. + /// public abstract string LogFragment { get; } /// @@ -45,6 +60,9 @@ protected DbContextOptionsExtensionInfo(IDbContextOptionsExtension extension) /// to be needed. For example, if the options affect a singleton service. However most extensions do not /// have any such options and should return zero. /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// A hash over options that require a new service provider when changed. public abstract int GetServiceProviderHashCode(); @@ -52,6 +70,9 @@ protected DbContextOptionsExtensionInfo(IDbContextOptionsExtension extension) /// Returns a value indicating whether all of the options used in /// are the same as in the given extension. /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// The other extension. /// A value indicating whether all of the options that require a new service provider are the same. public abstract bool ShouldUseSameServiceProvider(DbContextOptionsExtensionInfo other); @@ -62,6 +83,9 @@ protected DbContextOptionsExtensionInfo(IDbContextOptionsExtension extension) /// this option and differences can be logged. The dictionary key should be prefixed by the /// extension name. For example, "SqlServer:". /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// The dictionary to populate. public abstract void PopulateDebugInfo(IDictionary debugInfo); } diff --git a/src/EFCore/Infrastructure/DebugView.cs b/src/EFCore/Infrastructure/DebugView.cs index a52cbb218c6..8094b2a17cd 100644 --- a/src/EFCore/Infrastructure/DebugView.cs +++ b/src/EFCore/Infrastructure/DebugView.cs @@ -10,6 +10,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// A placeholder for lazily-generated debug strings that can be expanded in the debugger to /// to generate and display them. /// + /// + /// For more information, EF Core debug views. + /// public class DebugView { [DebuggerBrowsable(DebuggerBrowsableState.Never)] @@ -34,12 +37,18 @@ public DebugView( /// /// The long-form, detailed debug string. /// + /// + /// For more information, EF Core debug views. + /// public virtual string LongView => _toLongDebugString(); /// /// The short-form, less-detailed debug string. /// + /// + /// For more information, EF Core debug views. + /// public virtual string ShortView => _toShortDebugString(); } diff --git a/src/EFCore/Infrastructure/EntityFrameworkEventSource.cs b/src/EFCore/Infrastructure/EntityFrameworkEventSource.cs index 429aa54a14f..ec701f0803a 100644 --- a/src/EFCore/Infrastructure/EntityFrameworkEventSource.cs +++ b/src/EFCore/Infrastructure/EntityFrameworkEventSource.cs @@ -13,6 +13,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// /// An emitting Entity Framework performance counter data. /// + /// + /// For more information, see EF Core event counters. + /// public sealed class EntityFrameworkEventSource : EventSource { private long _activeDbContexts, _totalQueries, _totalSaveChanges; @@ -35,6 +38,9 @@ public sealed class EntityFrameworkEventSource : EventSource /// /// The singleton instance of . /// + /// + /// For more information, see EF Core event counters. + /// public static readonly EntityFrameworkEventSource Log = new(); private EntityFrameworkEventSource() @@ -45,48 +51,72 @@ private EntityFrameworkEventSource() /// /// Indicates that a new instance is being initialized. /// + /// + /// For more information, see EF Core event counters. + /// public void DbContextInitializing() => Interlocked.Increment(ref _activeDbContexts); /// /// Indicates that a instance is being disposed. /// + /// + /// For more information, see EF Core event counters. + /// public void DbContextDisposing() => Interlocked.Decrement(ref _activeDbContexts); /// /// Indicates that a query is about to begin execution. /// + /// + /// For more information, see EF Core event counters. + /// public void QueryExecuting() => Interlocked.Increment(ref _totalQueries); /// /// Indicates that changes are about to be saved. /// + /// + /// For more information, see EF Core event counters. + /// public void SavingChanges() => Interlocked.Increment(ref _totalSaveChanges); /// /// Indicates a hit in the compiled query cache, signifying that query compilation will not need to occur. /// + /// + /// For more information, see EF Core event counters. + /// public void CompiledQueryCacheHit() => Interlocked.Increment(ref _compiledQueryCacheInfo.Hits); /// /// Indicates a miss in the compiled query cache, signifying that query compilation will need to occur. /// + /// + /// For more information, see EF Core event counters. + /// public void CompiledQueryCacheMiss() => Interlocked.Increment(ref _compiledQueryCacheInfo.Misses); /// /// Indicates that an operation executed by an failed (and may be retried). /// + /// + /// For more information, see EF Core event counters. + /// public void ExecutionStrategyOperationFailure() => Interlocked.Increment(ref _totalExecutionStrategyOperationFailures); /// /// Indicates that an optimistic concurrency failure has occurred. /// + /// + /// For more information, see EF Core event counters. + /// public void OptimisticConcurrencyFailure() => Interlocked.Increment(ref _totalOptimisticConcurrencyFailures); diff --git a/src/EFCore/Infrastructure/EntityFrameworkServicesBuilder.cs b/src/EFCore/Infrastructure/EntityFrameworkServicesBuilder.cs index 0e60016bd2d..82d45db35bf 100644 --- a/src/EFCore/Infrastructure/EntityFrameworkServicesBuilder.cs +++ b/src/EFCore/Infrastructure/EntityFrameworkServicesBuilder.cs @@ -48,6 +48,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// can handle the new scope, and that it does not cause issue for services that depend on it. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public class EntityFrameworkServicesBuilder { /// @@ -155,6 +158,9 @@ public static readonly IDictionary CoreServices /// registration of provider services. Relational providers should use /// 'EntityFrameworkRelationalServicesBuilder'. /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// The collection to which services will be registered. public EntityFrameworkServicesBuilder(IServiceCollection serviceCollection) { @@ -166,11 +172,17 @@ public EntityFrameworkServicesBuilder(IServiceCollection serviceCollection) /// /// Access to the underlying . /// + /// + /// For more information, Implementation of database providers and extensions. + /// protected virtual ServiceCollectionMap ServiceCollectionMap { get; } /// /// Gets the for the given service type. /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// The type that defines the service API. /// The for the type. /// when the type is not an EF service. @@ -185,6 +197,9 @@ protected virtual ServiceCharacteristics GetServiceCharacteristics(Type serviceT /// /// Gets the for the given service type. /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// The type that defines the service API. /// The for the type or if it's not an EF service. protected virtual ServiceCharacteristics? TryGetServiceCharacteristics(Type serviceType) @@ -198,6 +213,9 @@ protected virtual ServiceCharacteristics GetServiceCharacteristics(Type serviceT /// Note that implementations of Entity Framework services should be registered directly on the /// and not through this method. /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// The underlying map to which provider services should be added. /// This builder, such that further calls can be chained. public virtual EntityFrameworkServicesBuilder TryAddProviderSpecificServices(Action serviceMap) @@ -224,6 +242,9 @@ public virtual EntityFrameworkServicesBuilder TryAddProviderSpecificServices(Act /// Database providers must call this method as the last step of service registration--that is, /// after all provider services have been registered. /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// This builder, such that further calls can be chained. public virtual EntityFrameworkServicesBuilder TryAddCoreServices() { @@ -344,6 +365,9 @@ private static IDbContextServices GetContextServices(IServiceProvider servicePro /// Adds an implementation of an Entity Framework service only if one has not already been registered. /// The scope of the service is automatically defined by Entity Framework. /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// The contract for the service. /// The concrete type that implements the service. /// This builder, such that further calls can be chained. @@ -356,6 +380,9 @@ public virtual EntityFrameworkServicesBuilder TryAdd( /// Adds an implementation of an Entity Framework service only if one has not already been registered. /// The scope of the service is automatically defined by Entity Framework. /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// The contract for the service. /// The concrete type that implements the service. /// This builder, such that further calls can be chained. @@ -382,6 +409,9 @@ public virtual EntityFrameworkServicesBuilder TryAdd(Type serviceType, Type impl /// Adds a factory for an Entity Framework service only if one has not already been registered. /// The scope of the service is automatically defined by Entity Framework. /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// The contract for the service. /// The factory that will create the service instance. /// This builder, such that further calls can be chained. @@ -393,6 +423,9 @@ public virtual EntityFrameworkServicesBuilder TryAdd(Func + /// + /// For more information, Implementation of database providers and extensions. + /// /// The contract for the service. /// The concrete type that implements the service. /// The factory that will create the service instance. @@ -407,6 +440,9 @@ public virtual EntityFrameworkServicesBuilder TryAdd( /// Adds a factory for an Entity Framework service only if one has not already been registered. /// The scope of the service is automatically defined by Entity Framework. /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// The contract for the service. /// The concrete type that implements the service. /// The factory that will create the service instance. @@ -444,6 +480,9 @@ public virtual EntityFrameworkServicesBuilder TryAdd( /// Adds an implementation of an Entity Framework service only if one has not already been registered. /// This method can only be used for singleton services. /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// The contract for the service. /// The implementation of the service. /// This builder, such that further calls can be chained. @@ -455,6 +494,9 @@ public virtual EntityFrameworkServicesBuilder TryAdd(TService implemen /// Adds an implementation of an Entity Framework service only if one has not already been registered. /// This method can only be used for singleton services. /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// The contract for the service. /// The implementation of the service. /// This builder, such that further calls can be chained. diff --git a/src/EFCore/Infrastructure/ExpressionExtensions.cs b/src/EFCore/Infrastructure/ExpressionExtensions.cs index 72a9851ed38..8788b1aa27b 100644 --- a/src/EFCore/Infrastructure/ExpressionExtensions.cs +++ b/src/EFCore/Infrastructure/ExpressionExtensions.cs @@ -26,6 +26,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public static class ExpressionExtensions { /// diff --git a/src/EFCore/Infrastructure/IAnnotatable.cs b/src/EFCore/Infrastructure/IAnnotatable.cs index d4dfdc62bc3..c8e24927436 100644 --- a/src/EFCore/Infrastructure/IAnnotatable.cs +++ b/src/EFCore/Infrastructure/IAnnotatable.cs @@ -15,6 +15,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface IAnnotatable : IReadOnlyAnnotatable { /// diff --git a/src/EFCore/Infrastructure/IAnnotation.cs b/src/EFCore/Infrastructure/IAnnotation.cs index cac2dce5833..a388df4a632 100644 --- a/src/EFCore/Infrastructure/IAnnotation.cs +++ b/src/EFCore/Infrastructure/IAnnotation.cs @@ -12,6 +12,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface IAnnotation { /// diff --git a/src/EFCore/Infrastructure/IConcurrencyDetector.cs b/src/EFCore/Infrastructure/IConcurrencyDetector.cs index 5b15b40069c..78eeaf5cb84 100644 --- a/src/EFCore/Infrastructure/IConcurrencyDetector.cs +++ b/src/EFCore/Infrastructure/IConcurrencyDetector.cs @@ -17,6 +17,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// The implementation does not need to be thread-safe. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface IConcurrencyDetector { /// diff --git a/src/EFCore/Infrastructure/ICoreSingletonOptions.cs b/src/EFCore/Infrastructure/ICoreSingletonOptions.cs index 4803a6ede8a..fa12a0aac81 100644 --- a/src/EFCore/Infrastructure/ICoreSingletonOptions.cs +++ b/src/EFCore/Infrastructure/ICoreSingletonOptions.cs @@ -16,6 +16,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This service cannot depend on services registered as . /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface ICoreSingletonOptions : ISingletonOptions { /// diff --git a/src/EFCore/Infrastructure/ICurrentDbContext.cs b/src/EFCore/Infrastructure/ICurrentDbContext.cs index 4850cca8ecc..1052170fa9d 100644 --- a/src/EFCore/Infrastructure/ICurrentDbContext.cs +++ b/src/EFCore/Infrastructure/ICurrentDbContext.cs @@ -21,6 +21,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// The implementation does not need to be thread-safe. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface ICurrentDbContext { /// diff --git a/src/EFCore/Infrastructure/IDbContextOptions.cs b/src/EFCore/Infrastructure/IDbContextOptions.cs index 0542788091a..472e7398876 100644 --- a/src/EFCore/Infrastructure/IDbContextOptions.cs +++ b/src/EFCore/Infrastructure/IDbContextOptions.cs @@ -20,6 +20,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// The implementation does not need to be thread-safe. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface IDbContextOptions { /// diff --git a/src/EFCore/Infrastructure/IDbContextOptionsBuilderInfrastructure.cs b/src/EFCore/Infrastructure/IDbContextOptionsBuilderInfrastructure.cs index 5587b1817f8..9acdac0f0e9 100644 --- a/src/EFCore/Infrastructure/IDbContextOptionsBuilderInfrastructure.cs +++ b/src/EFCore/Infrastructure/IDbContextOptionsBuilderInfrastructure.cs @@ -13,6 +13,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface IDbContextOptionsBuilderInfrastructure { /// @@ -24,6 +27,9 @@ public interface IDbContextOptionsBuilderInfrastructure /// application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// The type of extension to be added. /// The extension to be added. void AddOrUpdateExtension(TExtension extension) diff --git a/src/EFCore/Infrastructure/IDbContextOptionsExtension.cs b/src/EFCore/Infrastructure/IDbContextOptionsExtension.cs index c43fae65066..e30566edde8 100644 --- a/src/EFCore/Infrastructure/IDbContextOptionsExtension.cs +++ b/src/EFCore/Infrastructure/IDbContextOptionsExtension.cs @@ -15,6 +15,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface IDbContextOptionsExtension { /// diff --git a/src/EFCore/Infrastructure/IInfrastructure.cs b/src/EFCore/Infrastructure/IInfrastructure.cs index e2d8b66fb33..e8e1f3017a9 100644 --- a/src/EFCore/Infrastructure/IInfrastructure.cs +++ b/src/EFCore/Infrastructure/IInfrastructure.cs @@ -13,6 +13,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// /// The type of the property being hidden. public interface IInfrastructure { diff --git a/src/EFCore/Infrastructure/IInternalServiceCollectionMap.cs b/src/EFCore/Infrastructure/IInternalServiceCollectionMap.cs index c1ba23f2d82..6e4f838fd7a 100644 --- a/src/EFCore/Infrastructure/IInternalServiceCollectionMap.cs +++ b/src/EFCore/Infrastructure/IInternalServiceCollectionMap.cs @@ -14,6 +14,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface IInternalServiceCollectionMap { /// diff --git a/src/EFCore/Infrastructure/IModelCacheKeyFactory.cs b/src/EFCore/Infrastructure/IModelCacheKeyFactory.cs index b28387e4ed9..53387e09704 100644 --- a/src/EFCore/Infrastructure/IModelCacheKeyFactory.cs +++ b/src/EFCore/Infrastructure/IModelCacheKeyFactory.cs @@ -12,15 +12,14 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// a cached model for a given context. /// /// - /// This interface is typically used by database providers (and other extensions). It is generally - /// not used in application code. - /// - /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// /// + /// + /// For more information, EF Core model caching. + /// public interface IModelCacheKeyFactory { /// diff --git a/src/EFCore/Infrastructure/IModelCustomizer.cs b/src/EFCore/Infrastructure/IModelCustomizer.cs index f0de23f1537..ca7f9ebe6c8 100644 --- a/src/EFCore/Infrastructure/IModelCustomizer.cs +++ b/src/EFCore/Infrastructure/IModelCustomizer.cs @@ -23,6 +23,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This service cannot depend on services registered as . /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface IModelCustomizer { /// diff --git a/src/EFCore/Infrastructure/IModelRuntimeInitializer.cs b/src/EFCore/Infrastructure/IModelRuntimeInitializer.cs index 52dc77ce6e3..656565f5012 100644 --- a/src/EFCore/Infrastructure/IModelRuntimeInitializer.cs +++ b/src/EFCore/Infrastructure/IModelRuntimeInitializer.cs @@ -23,6 +23,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This service cannot depend on services registered as . /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface IModelRuntimeInitializer { /// diff --git a/src/EFCore/Infrastructure/IModelSource.cs b/src/EFCore/Infrastructure/IModelSource.cs index f875c6f37a7..7f9110a8b3d 100644 --- a/src/EFCore/Infrastructure/IModelSource.cs +++ b/src/EFCore/Infrastructure/IModelSource.cs @@ -23,6 +23,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This service cannot depend on services registered as . /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface IModelSource { /// diff --git a/src/EFCore/Infrastructure/IModelValidator.cs b/src/EFCore/Infrastructure/IModelValidator.cs index 4afbc6d4b98..eab79d19085 100644 --- a/src/EFCore/Infrastructure/IModelValidator.cs +++ b/src/EFCore/Infrastructure/IModelValidator.cs @@ -17,6 +17,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This service cannot depend on services registered as . /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface IModelValidator { /// diff --git a/src/EFCore/Infrastructure/IReadOnlyAnnotatable.cs b/src/EFCore/Infrastructure/IReadOnlyAnnotatable.cs index 1d3ab725309..b7176be728a 100644 --- a/src/EFCore/Infrastructure/IReadOnlyAnnotatable.cs +++ b/src/EFCore/Infrastructure/IReadOnlyAnnotatable.cs @@ -16,6 +16,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface IReadOnlyAnnotatable { /// diff --git a/src/EFCore/Infrastructure/IResettableService.cs b/src/EFCore/Infrastructure/IResettableService.cs index a1cd4ecfcde..55ebc1f5412 100644 --- a/src/EFCore/Infrastructure/IResettableService.cs +++ b/src/EFCore/Infrastructure/IResettableService.cs @@ -25,6 +25,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// The implementations do not need to be thread-safe. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface IResettableService { /// diff --git a/src/EFCore/Infrastructure/ISingletonOptions.cs b/src/EFCore/Infrastructure/ISingletonOptions.cs index 64341ed75eb..3f2142c45ea 100644 --- a/src/EFCore/Infrastructure/ISingletonOptions.cs +++ b/src/EFCore/Infrastructure/ISingletonOptions.cs @@ -18,6 +18,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This service cannot depend on services registered as . /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public interface ISingletonOptions { /// diff --git a/src/EFCore/Infrastructure/IndentedStringBuilder.cs b/src/EFCore/Infrastructure/IndentedStringBuilder.cs index 27502675cd5..93ddeb0fbf0 100644 --- a/src/EFCore/Infrastructure/IndentedStringBuilder.cs +++ b/src/EFCore/Infrastructure/IndentedStringBuilder.cs @@ -17,6 +17,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public class IndentedStringBuilder { private const byte IndentSize = 4; diff --git a/src/EFCore/Infrastructure/MetadataDebugStringOptions.cs b/src/EFCore/Infrastructure/MetadataDebugStringOptions.cs index 30b422ac46a..e5c43fbdefd 100644 --- a/src/EFCore/Infrastructure/MetadataDebugStringOptions.cs +++ b/src/EFCore/Infrastructure/MetadataDebugStringOptions.cs @@ -8,6 +8,10 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// /// Options to print debug string differently for metadata objects. /// + /// + /// For more information, Modeling entity types and relationships and + /// EF Core debug views. + /// [Flags] public enum MetadataDebugStringOptions { diff --git a/src/EFCore/Infrastructure/MethodInfoExtensions.cs b/src/EFCore/Infrastructure/MethodInfoExtensions.cs index 3a03e40d449..3542f735ee9 100644 --- a/src/EFCore/Infrastructure/MethodInfoExtensions.cs +++ b/src/EFCore/Infrastructure/MethodInfoExtensions.cs @@ -14,6 +14,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public static class MethodInfoExtensions { private static readonly string _efTypeName = typeof(EF).FullName!; diff --git a/src/EFCore/Infrastructure/ModelCacheKey.cs b/src/EFCore/Infrastructure/ModelCacheKey.cs index a1190d2fb72..1b5ba7df368 100644 --- a/src/EFCore/Infrastructure/ModelCacheKey.cs +++ b/src/EFCore/Infrastructure/ModelCacheKey.cs @@ -11,11 +11,10 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// a cached model for a given context. This default implementation uses the context type as they key, thus /// assuming that all contexts of a given type have the same model. /// - /// - /// This type is typically used by database providers (and other extensions). It is generally - /// not used in application code. - /// /// + /// + /// For more information, EF Core model caching. + /// public class ModelCacheKey { private readonly Type _dbContextType; diff --git a/src/EFCore/Infrastructure/ModelCacheKeyFactory.cs b/src/EFCore/Infrastructure/ModelCacheKeyFactory.cs index 44793e96cba..b3e7258e028 100644 --- a/src/EFCore/Infrastructure/ModelCacheKeyFactory.cs +++ b/src/EFCore/Infrastructure/ModelCacheKeyFactory.cs @@ -13,15 +13,14 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// assuming that all contexts of a given type have the same model. /// /// - /// This type is typically used by database providers (and other extensions). It is generally - /// not used in application code. - /// - /// /// The service lifetime is . This means a single instance /// is used by many instances. The implementation must be thread-safe. /// This service cannot depend on services registered as . /// /// + /// + /// For more information, EF Core model caching. + /// public class ModelCacheKeyFactory : IModelCacheKeyFactory { /// diff --git a/src/EFCore/Infrastructure/ModelCustomizer.cs b/src/EFCore/Infrastructure/ModelCustomizer.cs index e8cae64bdfb..da103399a10 100644 --- a/src/EFCore/Infrastructure/ModelCustomizer.cs +++ b/src/EFCore/Infrastructure/ModelCustomizer.cs @@ -21,6 +21,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This service cannot depend on services registered as . /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public class ModelCustomizer : IModelCustomizer { /// diff --git a/src/EFCore/Infrastructure/ModelRuntimeInitializer.cs b/src/EFCore/Infrastructure/ModelRuntimeInitializer.cs index 15b6091c6ee..31ac8f3b717 100644 --- a/src/EFCore/Infrastructure/ModelRuntimeInitializer.cs +++ b/src/EFCore/Infrastructure/ModelRuntimeInitializer.cs @@ -23,6 +23,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This service cannot depend on services registered as . /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public class ModelRuntimeInitializer : IModelRuntimeInitializer { private static readonly object _syncObject = new(); diff --git a/src/EFCore/Infrastructure/ModelSource.cs b/src/EFCore/Infrastructure/ModelSource.cs index 80a7130d588..b0cf242e5e8 100644 --- a/src/EFCore/Infrastructure/ModelSource.cs +++ b/src/EFCore/Infrastructure/ModelSource.cs @@ -27,6 +27,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This service cannot depend on services registered as . /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public class ModelSource : IModelSource { private readonly object _syncObject = new(); diff --git a/src/EFCore/Infrastructure/ModelValidator.cs b/src/EFCore/Infrastructure/ModelValidator.cs index 46b36c93f2c..3811d685340 100644 --- a/src/EFCore/Infrastructure/ModelValidator.cs +++ b/src/EFCore/Infrastructure/ModelValidator.cs @@ -26,6 +26,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// This service cannot depend on services registered as . /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public class ModelValidator : IModelValidator { private static readonly IEnumerable _dictionaryProperties = diff --git a/src/EFCore/Infrastructure/PooledDbContextFactory.cs b/src/EFCore/Infrastructure/PooledDbContextFactory.cs index ba5274351ed..b7528eb92bf 100644 --- a/src/EFCore/Infrastructure/PooledDbContextFactory.cs +++ b/src/EFCore/Infrastructure/PooledDbContextFactory.cs @@ -17,6 +17,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// methods. /// /// + /// + /// For more information, see Using DbContext factories and pooling. + /// public class PooledDbContextFactory : IDbContextFactory where TContext : DbContext { diff --git a/src/EFCore/Infrastructure/ServiceCharacteristics.cs b/src/EFCore/Infrastructure/ServiceCharacteristics.cs index 66501208559..cee1d770a8d 100644 --- a/src/EFCore/Infrastructure/ServiceCharacteristics.cs +++ b/src/EFCore/Infrastructure/ServiceCharacteristics.cs @@ -8,6 +8,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// /// Characteristics of a given EF service. /// + /// + /// For more information, Implementation of database providers and extensions. + /// public readonly struct ServiceCharacteristics { /// diff --git a/src/EFCore/Infrastructure/ServiceCollectionMap.cs b/src/EFCore/Infrastructure/ServiceCollectionMap.cs index 797436eb13c..25ea11c8a8e 100644 --- a/src/EFCore/Infrastructure/ServiceCollectionMap.cs +++ b/src/EFCore/Infrastructure/ServiceCollectionMap.cs @@ -21,6 +21,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// been completed. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public class ServiceCollectionMap : IInfrastructure { private readonly InternalServiceCollectionMap _map; diff --git a/src/EFCore/Infrastructure/TypeExtensions.cs b/src/EFCore/Infrastructure/TypeExtensions.cs index 6851a84b851..802610c027f 100644 --- a/src/EFCore/Infrastructure/TypeExtensions.cs +++ b/src/EFCore/Infrastructure/TypeExtensions.cs @@ -14,6 +14,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// not used in application code. /// /// + /// + /// For more information, Implementation of database providers and extensions. + /// public static class TypeExtensions { /// diff --git a/src/EFCore/Infrastructure/Uniquifier.cs b/src/EFCore/Infrastructure/Uniquifier.cs index 32383d08136..6a4dc7cd7a4 100644 --- a/src/EFCore/Infrastructure/Uniquifier.cs +++ b/src/EFCore/Infrastructure/Uniquifier.cs @@ -10,6 +10,9 @@ namespace Microsoft.EntityFrameworkCore.Infrastructure /// /// Provides methods for manipulating string identifiers. /// + /// + /// For more information, Implementation of database providers and extensions. + /// public static class Uniquifier { ///