diff --git a/src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.QueryingEnumerable.cs b/src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.QueryingEnumerable.cs index e2a2d8012ba..de0c091551c 100644 --- a/src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.QueryingEnumerable.cs +++ b/src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.QueryingEnumerable.cs @@ -37,7 +37,7 @@ private sealed class QueryingEnumerable : IEnumerable, IAsyncEnumerable private readonly string _partitionKey; private readonly IDiagnosticsLogger _queryLogger; private readonly bool _standAloneStateManager; - private readonly bool _concurrencyDetectionEnabled; + private readonly bool _threadSafetyChecksEnabled; public QueryingEnumerable( CosmosQueryContext cosmosQueryContext, @@ -48,7 +48,7 @@ public QueryingEnumerable( Type contextType, string partitionKeyFromExtension, bool standAloneStateManager, - bool concurrencyDetectionEnabled) + bool threadSafetyChecksEnabled) { _cosmosQueryContext = cosmosQueryContext; _sqlExpressionFactory = sqlExpressionFactory; @@ -58,7 +58,7 @@ public QueryingEnumerable( _contextType = contextType; _queryLogger = cosmosQueryContext.QueryLogger; _standAloneStateManager = standAloneStateManager; - _concurrencyDetectionEnabled = concurrencyDetectionEnabled; + _threadSafetyChecksEnabled = threadSafetyChecksEnabled; var partitionKey = selectExpression.GetPartitionKey(cosmosQueryContext.ParameterValues); if (partitionKey != null && partitionKeyFromExtension != null && partitionKeyFromExtension != partitionKey) @@ -133,7 +133,7 @@ public Enumerator(QueryingEnumerable queryingEnumerable) _queryLogger = queryingEnumerable._queryLogger; _standAloneStateManager = queryingEnumerable._standAloneStateManager; - _concurrencyDetector = queryingEnumerable._concurrencyDetectionEnabled + _concurrencyDetector = queryingEnumerable._threadSafetyChecksEnabled ? _cosmosQueryContext.ConcurrencyDetector : null; } @@ -225,7 +225,7 @@ public AsyncEnumerator(QueryingEnumerable queryingEnumerable, CancellationTok _standAloneStateManager = queryingEnumerable._standAloneStateManager; _cancellationToken = cancellationToken; - _concurrencyDetector = queryingEnumerable._concurrencyDetectionEnabled + _concurrencyDetector = queryingEnumerable._threadSafetyChecksEnabled ? _cosmosQueryContext.ConcurrencyDetector : null; } diff --git a/src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.ReadItemQueryingEnumerable.cs b/src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.ReadItemQueryingEnumerable.cs index bbddbbd2945..8ae45d73665 100644 --- a/src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.ReadItemQueryingEnumerable.cs +++ b/src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.ReadItemQueryingEnumerable.cs @@ -37,7 +37,7 @@ private sealed class ReadItemQueryingEnumerable : IEnumerable, IAsyncEnume private readonly Type _contextType; private readonly IDiagnosticsLogger _queryLogger; private readonly bool _standAloneStateManager; - private readonly bool _concurrencyDetectionEnabled; + private readonly bool _threadSafetyChecksEnabled; public ReadItemQueryingEnumerable( CosmosQueryContext cosmosQueryContext, @@ -45,7 +45,7 @@ public ReadItemQueryingEnumerable( Func shaper, Type contextType, bool standAloneStateManager, - bool concurrencyDetectionEnabled) + bool threadSafetyChecksEnabled) { _cosmosQueryContext = cosmosQueryContext; _readItemExpression = readItemExpression; @@ -53,7 +53,7 @@ public ReadItemQueryingEnumerable( _contextType = contextType; _queryLogger = _cosmosQueryContext.QueryLogger; _standAloneStateManager = standAloneStateManager; - _concurrencyDetectionEnabled = concurrencyDetectionEnabled; + _threadSafetyChecksEnabled = threadSafetyChecksEnabled; } public IAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) @@ -196,7 +196,7 @@ public Enumerator(ReadItemQueryingEnumerable readItemEnumerable, Cancellation _readItemEnumerable = readItemEnumerable; _cancellationToken = cancellationToken; - _concurrencyDetector = readItemEnumerable._concurrencyDetectionEnabled + _concurrencyDetector = readItemEnumerable._threadSafetyChecksEnabled ? _cosmosQueryContext.ConcurrencyDetector : null; } diff --git a/src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.cs b/src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.cs index 4692ad5311a..41df5e32877 100644 --- a/src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.cs +++ b/src/EFCore.Cosmos/Query/Internal/CosmosShapedQueryCompilingExpressionVisitor.cs @@ -23,7 +23,7 @@ public partial class CosmosShapedQueryCompilingExpressionVisitor : ShapedQueryCo private readonly ISqlExpressionFactory _sqlExpressionFactory; private readonly IQuerySqlGeneratorFactory _querySqlGeneratorFactory; private readonly Type _contextType; - private readonly bool _concurrencyDetectionEnabled; + private readonly bool _threadSafetyChecksEnabled; private readonly string _partitionKeyFromExtension; /// @@ -42,7 +42,7 @@ public CosmosShapedQueryCompilingExpressionVisitor( _sqlExpressionFactory = sqlExpressionFactory; _querySqlGeneratorFactory = querySqlGeneratorFactory; _contextType = cosmosQueryCompilationContext.ContextType; - _concurrencyDetectionEnabled = dependencies.CoreSingletonOptions.IsConcurrencyDetectionEnabled; + _threadSafetyChecksEnabled = dependencies.CoreSingletonOptions.AreThreadSafetyChecksEnabled; _partitionKeyFromExtension = cosmosQueryCompilationContext.PartitionKeyFromExtension; } @@ -89,7 +89,7 @@ protected override Expression VisitShapedQuery(ShapedQueryExpression shapedQuery Expression.Constant(_partitionKeyFromExtension, typeof(string)), Expression.Constant( QueryCompilationContext.QueryTrackingBehavior == QueryTrackingBehavior.NoTrackingWithIdentityResolution), - Expression.Constant(_concurrencyDetectionEnabled)); + Expression.Constant(_threadSafetyChecksEnabled)); case ReadItemExpression readItemExpression: @@ -113,7 +113,7 @@ protected override Expression VisitShapedQuery(ShapedQueryExpression shapedQuery Expression.Constant(_contextType), Expression.Constant( QueryCompilationContext.QueryTrackingBehavior == QueryTrackingBehavior.NoTrackingWithIdentityResolution), - Expression.Constant(_concurrencyDetectionEnabled)); + Expression.Constant(_threadSafetyChecksEnabled)); default: throw new NotSupportedException(CoreStrings.UnhandledExpressionNode(shapedQueryExpression.QueryExpression)); diff --git a/src/EFCore.InMemory/Query/Internal/InMemoryShapedQueryCompilingExpressionVisitor.QueryingEnumerable.cs b/src/EFCore.InMemory/Query/Internal/InMemoryShapedQueryCompilingExpressionVisitor.QueryingEnumerable.cs index 1417b5aa261..084a8a4effd 100644 --- a/src/EFCore.InMemory/Query/Internal/InMemoryShapedQueryCompilingExpressionVisitor.QueryingEnumerable.cs +++ b/src/EFCore.InMemory/Query/Internal/InMemoryShapedQueryCompilingExpressionVisitor.QueryingEnumerable.cs @@ -31,7 +31,7 @@ private sealed class QueryingEnumerable : IAsyncEnumerable, IEnumerable private readonly Type _contextType; private readonly IDiagnosticsLogger _queryLogger; private readonly bool _standAloneStateManager; - private readonly bool _concurrencyDetectionEnabled; + private readonly bool _threadSafetyChecksEnabled; public QueryingEnumerable( QueryContext queryContext, @@ -39,7 +39,7 @@ public QueryingEnumerable( Func shaper, Type contextType, bool standAloneStateManager, - bool concurrencyDetectionEnabled) + bool threadSafetyChecksEnabled) { _queryContext = queryContext; _innerEnumerable = innerEnumerable; @@ -47,7 +47,7 @@ public QueryingEnumerable( _contextType = contextType; _queryLogger = queryContext.QueryLogger; _standAloneStateManager = standAloneStateManager; - _concurrencyDetectionEnabled = concurrencyDetectionEnabled; + _threadSafetyChecksEnabled = threadSafetyChecksEnabled; } public IAsyncEnumerator GetAsyncEnumerator(CancellationToken cancellationToken = default) @@ -86,7 +86,7 @@ public Enumerator(QueryingEnumerable queryingEnumerable, CancellationToken ca _cancellationToken = cancellationToken; Current = default!; - _concurrencyDetector = queryingEnumerable._concurrencyDetectionEnabled + _concurrencyDetector = queryingEnumerable._threadSafetyChecksEnabled ? _queryContext.ConcurrencyDetector : null; } diff --git a/src/EFCore.InMemory/Query/Internal/InMemoryShapedQueryCompilingExpressionVisitor.cs b/src/EFCore.InMemory/Query/Internal/InMemoryShapedQueryCompilingExpressionVisitor.cs index 2dadf002550..d8dcf09f3cd 100644 --- a/src/EFCore.InMemory/Query/Internal/InMemoryShapedQueryCompilingExpressionVisitor.cs +++ b/src/EFCore.InMemory/Query/Internal/InMemoryShapedQueryCompilingExpressionVisitor.cs @@ -15,7 +15,7 @@ namespace Microsoft.EntityFrameworkCore.InMemory.Query.Internal public partial class InMemoryShapedQueryCompilingExpressionVisitor : ShapedQueryCompilingExpressionVisitor { private readonly Type _contextType; - private readonly bool _concurrencyDetectionEnabled; + private readonly bool _threadSafetyChecksEnabled; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -29,7 +29,7 @@ public InMemoryShapedQueryCompilingExpressionVisitor( : base(dependencies, queryCompilationContext) { _contextType = queryCompilationContext.ContextType; - _concurrencyDetectionEnabled = dependencies.CoreSingletonOptions.IsConcurrencyDetectionEnabled; + _threadSafetyChecksEnabled = dependencies.CoreSingletonOptions.AreThreadSafetyChecksEnabled; } /// @@ -93,7 +93,7 @@ protected override Expression VisitShapedQuery(ShapedQueryExpression shapedQuery Expression.Constant(_contextType), Expression.Constant( QueryCompilationContext.QueryTrackingBehavior == QueryTrackingBehavior.NoTrackingWithIdentityResolution), - Expression.Constant(_concurrencyDetectionEnabled)); + Expression.Constant(_threadSafetyChecksEnabled)); } private static readonly MethodInfo _tableMethodInfo diff --git a/src/EFCore.Relational/Extensions/RelationalDatabaseFacadeExtensions.cs b/src/EFCore.Relational/Extensions/RelationalDatabaseFacadeExtensions.cs index 550c6fe5b29..41e00ba6504 100644 --- a/src/EFCore.Relational/Extensions/RelationalDatabaseFacadeExtensions.cs +++ b/src/EFCore.Relational/Extensions/RelationalDatabaseFacadeExtensions.cs @@ -218,7 +218,7 @@ public static int ExecuteSqlRaw( Check.NotNull(parameters, nameof(parameters)); var facadeDependencies = GetFacadeDependencies(databaseFacade); - var concurrencyDetector = facadeDependencies.CoreOptions.IsConcurrencyDetectionEnabled + var concurrencyDetector = facadeDependencies.CoreOptions.AreThreadSafetyChecksEnabled ? facadeDependencies.ConcurrencyDetector : null; var logger = facadeDependencies.CommandLogger; @@ -398,7 +398,7 @@ public static async Task ExecuteSqlRawAsync( Check.NotNull(parameters, nameof(parameters)); var facadeDependencies = GetFacadeDependencies(databaseFacade); - var concurrencyDetector = facadeDependencies.CoreOptions.IsConcurrencyDetectionEnabled + var concurrencyDetector = facadeDependencies.CoreOptions.AreThreadSafetyChecksEnabled ? facadeDependencies.ConcurrencyDetector : null; var logger = facadeDependencies.CommandLogger; diff --git a/src/EFCore.Relational/Infrastructure/RelationalModelRuntimeInitializerDependencies.cs b/src/EFCore.Relational/Infrastructure/RelationalModelRuntimeInitializerDependencies.cs index f456aed9b36..55453227011 100644 --- a/src/EFCore.Relational/Infrastructure/RelationalModelRuntimeInitializerDependencies.cs +++ b/src/EFCore.Relational/Infrastructure/RelationalModelRuntimeInitializerDependencies.cs @@ -53,13 +53,13 @@ public sealed record RelationalModelRuntimeInitializerDependencies /// [EntityFrameworkInternal] public RelationalModelRuntimeInitializerDependencies( - RelationalModelDependencies singletonModelDependencies, + RelationalModelDependencies relationalModelDependencies, IRelationalAnnotationProvider relationalAnnotationProvider) { - Check.NotNull(singletonModelDependencies, nameof(singletonModelDependencies)); + Check.NotNull(relationalModelDependencies, nameof(relationalModelDependencies)); Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider)); - RelationalModelDependencies = singletonModelDependencies; + RelationalModelDependencies = relationalModelDependencies; RelationalAnnotationProvider = relationalAnnotationProvider; } diff --git a/src/EFCore.Relational/Query/Internal/FromSqlQueryingEnumerable.cs b/src/EFCore.Relational/Query/Internal/FromSqlQueryingEnumerable.cs index 10f5683e8b9..9990c3b23a1 100644 --- a/src/EFCore.Relational/Query/Internal/FromSqlQueryingEnumerable.cs +++ b/src/EFCore.Relational/Query/Internal/FromSqlQueryingEnumerable.cs @@ -30,7 +30,7 @@ public class FromSqlQueryingEnumerable : IEnumerable, IAsyncEnumerable, private readonly IDiagnosticsLogger _queryLogger; private readonly bool _standAloneStateManager; private readonly bool _detailedErrorsEnabled; - private readonly bool _concurrencyDetectionEnabled; + private readonly bool _threadSafetyChecksEnabled; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -46,7 +46,7 @@ public FromSqlQueryingEnumerable( Type contextType, bool standAloneStateManager, bool detailedErrorsEnabled, - bool concurrencyDetectionEnabled) + bool threadSafetyChecksEnabled) { _relationalQueryContext = relationalQueryContext; _relationalCommandCache = relationalCommandCache; @@ -56,7 +56,7 @@ public FromSqlQueryingEnumerable( _queryLogger = relationalQueryContext.QueryLogger; _standAloneStateManager = standAloneStateManager; _detailedErrorsEnabled = detailedErrorsEnabled; - _concurrencyDetectionEnabled = concurrencyDetectionEnabled; + _threadSafetyChecksEnabled = threadSafetyChecksEnabled; } /// @@ -176,7 +176,7 @@ public Enumerator(FromSqlQueryingEnumerable queryingEnumerable) _detailedErrorsEnabled = queryingEnumerable._detailedErrorsEnabled; Current = default!; - _concurrencyDetector = queryingEnumerable._concurrencyDetectionEnabled + _concurrencyDetector = queryingEnumerable._threadSafetyChecksEnabled ? _relationalQueryContext.ConcurrencyDetector : null; } @@ -229,7 +229,7 @@ private static bool InitializeReader(Enumerator enumerator) enumerator._relationalQueryContext.ParameterValues); var relationalCommand = enumerator._relationalCommand = enumerator._relationalQueryContext.Connection.RentCommand(); - relationalCommand.PopulateFromTemplate(relationalCommandTemplate); + relationalCommand.PopulateFrom(relationalCommandTemplate); enumerator._dataReader = relationalCommand.ExecuteReader( new RelationalCommandParameterObject( @@ -289,7 +289,7 @@ public AsyncEnumerator(FromSqlQueryingEnumerable queryingEnumerable) _detailedErrorsEnabled = queryingEnumerable._detailedErrorsEnabled; Current = default!; - _concurrencyDetector = queryingEnumerable._concurrencyDetectionEnabled + _concurrencyDetector = queryingEnumerable._threadSafetyChecksEnabled ? _relationalQueryContext.ConcurrencyDetector : null; } @@ -344,7 +344,7 @@ private static async Task InitializeReaderAsync(AsyncEnumerator enumerator enumerator._relationalQueryContext.ParameterValues); var relationalCommand = enumerator._relationalCommand = enumerator._relationalQueryContext.Connection.RentCommand(); - relationalCommand.PopulateFromTemplate(relationalCommandTemplate); + relationalCommand.PopulateFrom(relationalCommandTemplate); enumerator._dataReader = await relationalCommand.ExecuteReaderAsync( new RelationalCommandParameterObject( diff --git a/src/EFCore.Relational/Query/Internal/SingleQueryingEnumerable.cs b/src/EFCore.Relational/Query/Internal/SingleQueryingEnumerable.cs index 3937d9cf5fd..81ed25f8b9c 100644 --- a/src/EFCore.Relational/Query/Internal/SingleQueryingEnumerable.cs +++ b/src/EFCore.Relational/Query/Internal/SingleQueryingEnumerable.cs @@ -28,7 +28,7 @@ public class SingleQueryingEnumerable : IEnumerable, IAsyncEnumerable, private readonly IDiagnosticsLogger _queryLogger; private readonly bool _standAloneStateManager; private readonly bool _detailedErrorsEnabled; - private readonly bool _concurrencyDetectionEnabled; + private readonly bool _threadSafetyChecksEnabled; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -43,7 +43,7 @@ public SingleQueryingEnumerable( Type contextType, bool standAloneStateManager, bool detailedErrorsEnabled, - bool concurrencyDetectionEnabled) + bool threadSafetyChecksEnabled) { _relationalQueryContext = relationalQueryContext; _relationalCommandCache = relationalCommandCache; @@ -52,7 +52,7 @@ public SingleQueryingEnumerable( _queryLogger = relationalQueryContext.QueryLogger; _standAloneStateManager = standAloneStateManager; _detailedErrorsEnabled = detailedErrorsEnabled; - _concurrencyDetectionEnabled = concurrencyDetectionEnabled; + _threadSafetyChecksEnabled = threadSafetyChecksEnabled; } /// @@ -143,7 +143,7 @@ public Enumerator(SingleQueryingEnumerable queryingEnumerable) _detailedErrorsEnabled = queryingEnumerable._detailedErrorsEnabled; Current = default!; - _concurrencyDetector = queryingEnumerable._concurrencyDetectionEnabled + _concurrencyDetector = queryingEnumerable._threadSafetyChecksEnabled ? _relationalQueryContext.ConcurrencyDetector : null; } @@ -223,7 +223,7 @@ private static bool InitializeReader(Enumerator enumerator) enumerator._relationalQueryContext.ParameterValues); var relationalCommand = enumerator._relationalCommand = enumerator._relationalQueryContext.Connection.RentCommand(); - relationalCommand.PopulateFromTemplate(relationalCommandTemplate); + relationalCommand.PopulateFrom(relationalCommandTemplate); enumerator._dataReader = relationalCommand.ExecuteReader( new RelationalCommandParameterObject( @@ -281,7 +281,7 @@ public AsyncEnumerator(SingleQueryingEnumerable queryingEnumerable) _detailedErrorsEnabled = queryingEnumerable._detailedErrorsEnabled; Current = default!; - _concurrencyDetector = queryingEnumerable._concurrencyDetectionEnabled + _concurrencyDetector = queryingEnumerable._threadSafetyChecksEnabled ? _relationalQueryContext.ConcurrencyDetector : null; } @@ -364,7 +364,7 @@ private static async Task InitializeReaderAsync(AsyncEnumerator enumerator enumerator._relationalQueryContext.ParameterValues); var relationalCommand = enumerator._relationalCommand = enumerator._relationalQueryContext.Connection.RentCommand(); - relationalCommand.PopulateFromTemplate(relationalCommandTemplate); + relationalCommand.PopulateFrom(relationalCommandTemplate); enumerator._dataReader = await relationalCommand.ExecuteReaderAsync( new RelationalCommandParameterObject( diff --git a/src/EFCore.Relational/Query/Internal/SplitQueryingEnumerable.cs b/src/EFCore.Relational/Query/Internal/SplitQueryingEnumerable.cs index bc99282ebd2..0a077fd74ea 100644 --- a/src/EFCore.Relational/Query/Internal/SplitQueryingEnumerable.cs +++ b/src/EFCore.Relational/Query/Internal/SplitQueryingEnumerable.cs @@ -30,7 +30,7 @@ public class SplitQueryingEnumerable : IEnumerable, IAsyncEnumerable, I private readonly IDiagnosticsLogger _queryLogger; private readonly bool _standAloneStateManager; private readonly bool _detailedErrorsEnabled; - private readonly bool _concurrencyDetectionEnabled; + private readonly bool _threadSafetyChecksEnabled; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -47,7 +47,7 @@ public SplitQueryingEnumerable( Type contextType, bool standAloneStateManager, bool detailedErrorsEnabled, - bool concurrencyDetectionEnabled) + bool threadSafetyChecksEnabled) { _relationalQueryContext = relationalQueryContext; _relationalCommandCache = relationalCommandCache; @@ -58,7 +58,7 @@ public SplitQueryingEnumerable( _queryLogger = relationalQueryContext.QueryLogger; _standAloneStateManager = standAloneStateManager; _detailedErrorsEnabled = detailedErrorsEnabled; - _concurrencyDetectionEnabled = concurrencyDetectionEnabled; + _threadSafetyChecksEnabled = threadSafetyChecksEnabled; } /// @@ -153,7 +153,7 @@ public Enumerator(SplitQueryingEnumerable queryingEnumerable) _detailedErrorsEnabled = queryingEnumerable._detailedErrorsEnabled; Current = default!; - _concurrencyDetector = queryingEnumerable._concurrencyDetectionEnabled + _concurrencyDetector = queryingEnumerable._threadSafetyChecksEnabled ? _relationalQueryContext.ConcurrencyDetector : null; } @@ -217,7 +217,7 @@ private static bool InitializeReader(Enumerator enumerator) enumerator._relationalQueryContext.ParameterValues); var relationalCommand = enumerator._relationalCommand = enumerator._relationalQueryContext.Connection.RentCommand(); - relationalCommand.PopulateFromTemplate(relationalCommandTemplate); + relationalCommand.PopulateFrom(relationalCommandTemplate); enumerator._dataReader = relationalCommand.ExecuteReader( new RelationalCommandParameterObject( @@ -290,7 +290,7 @@ public AsyncEnumerator(SplitQueryingEnumerable queryingEnumerable) _detailedErrorEnabled = queryingEnumerable._detailedErrorsEnabled; Current = default!; - _concurrencyDetector = queryingEnumerable._concurrencyDetectionEnabled + _concurrencyDetector = queryingEnumerable._threadSafetyChecksEnabled ? _relationalQueryContext.ConcurrencyDetector : null; } @@ -361,7 +361,7 @@ private static async Task InitializeReaderAsync(AsyncEnumerator enumerator enumerator._relationalQueryContext.ParameterValues); var relationalCommand = enumerator._relationalCommand = enumerator._relationalQueryContext.Connection.RentCommand(); - relationalCommand.PopulateFromTemplate(relationalCommandTemplate); + relationalCommand.PopulateFrom(relationalCommandTemplate); enumerator._dataReader = await relationalCommand.ExecuteReaderAsync( new RelationalCommandParameterObject( diff --git a/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs b/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs index abdfc2ee250..7257d608ce6 100644 --- a/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs +++ b/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs @@ -1405,7 +1405,7 @@ static RelationalDataReader InitializeReader( { var relationalCommandTemplate = relationalCommandCache.GetRelationalCommand(queryContext.ParameterValues); var relationalCommand = queryContext.Connection.RentCommand(); - relationalCommand.PopulateFromTemplate(relationalCommandTemplate); + relationalCommand.PopulateFrom(relationalCommandTemplate); return relationalCommand.ExecuteReader( new RelationalCommandParameterObject( @@ -1494,7 +1494,7 @@ async Task InitializeReaderAsync( { var relationalCommandTemplate = relationalCommandCache.GetRelationalCommand(queryContext.ParameterValues); var relationalCommand = queryContext.Connection.RentCommand(); - relationalCommand.PopulateFromTemplate(relationalCommandTemplate); + relationalCommand.PopulateFrom(relationalCommandTemplate); return await relationalCommand.ExecuteReaderAsync( new RelationalCommandParameterObject( diff --git a/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitor.cs b/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitor.cs index b366e43db5d..82e56e98e37 100644 --- a/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitor.cs +++ b/src/EFCore.Relational/Query/RelationalShapedQueryCompilingExpressionVisitor.cs @@ -20,7 +20,7 @@ public partial class RelationalShapedQueryCompilingExpressionVisitor : ShapedQue { private readonly Type _contextType; private readonly ISet _tags; - private readonly bool _concurrencyDetectionEnabled; + private readonly bool _threadSafetyChecksEnabled; private readonly bool _detailedErrorsEnabled; private readonly bool _useRelationalNulls; @@ -42,7 +42,7 @@ public RelationalShapedQueryCompilingExpressionVisitor( _contextType = queryCompilationContext.ContextType; _tags = queryCompilationContext.Tags; - _concurrencyDetectionEnabled = dependencies.CoreSingletonOptions.IsConcurrencyDetectionEnabled; + _threadSafetyChecksEnabled = dependencies.CoreSingletonOptions.AreThreadSafetyChecksEnabled; _detailedErrorsEnabled = dependencies.CoreSingletonOptions.AreDetailedErrorsEnabled; _useRelationalNulls = RelationalOptionsExtension.Extract(queryCompilationContext.ContextOptions).UseRelationalNulls; } @@ -86,7 +86,7 @@ protected override Expression VisitShapedQuery(ShapedQueryExpression shapedQuery Expression.Constant( QueryCompilationContext.QueryTrackingBehavior == QueryTrackingBehavior.NoTrackingWithIdentityResolution), Expression.Constant(_detailedErrorsEnabled), - Expression.Constant(_concurrencyDetectionEnabled)); + Expression.Constant(_threadSafetyChecksEnabled)); } if (splitQuery) @@ -110,7 +110,7 @@ protected override Expression VisitShapedQuery(ShapedQueryExpression shapedQuery Expression.Constant( QueryCompilationContext.QueryTrackingBehavior == QueryTrackingBehavior.NoTrackingWithIdentityResolution), Expression.Constant(_detailedErrorsEnabled), - Expression.Constant(_concurrencyDetectionEnabled)); + Expression.Constant(_threadSafetyChecksEnabled)); } return Expression.New( @@ -122,7 +122,7 @@ protected override Expression VisitShapedQuery(ShapedQueryExpression shapedQuery Expression.Constant( QueryCompilationContext.QueryTrackingBehavior == QueryTrackingBehavior.NoTrackingWithIdentityResolution), Expression.Constant(_detailedErrorsEnabled), - Expression.Constant(_concurrencyDetectionEnabled)); + Expression.Constant(_threadSafetyChecksEnabled)); } } } diff --git a/src/EFCore.Relational/Storage/IRelationalCommand.cs b/src/EFCore.Relational/Storage/IRelationalCommand.cs index 72f9ebdd2c5..08a6942f900 100644 --- a/src/EFCore.Relational/Storage/IRelationalCommand.cs +++ b/src/EFCore.Relational/Storage/IRelationalCommand.cs @@ -111,9 +111,9 @@ DbCommand CreateDbCommand( DbCommandMethod commandMethod); /// - /// Populates this command from the provided . + /// Populates this command from the provided . /// - /// A template command from which the command text and parameters will be copied. - void PopulateFromTemplate(IRelationalCommand templateCommand); + /// A template command from which the command text and parameters will be copied. + void PopulateFrom(IRelationalCommand command); } } diff --git a/src/EFCore.Relational/Storage/RelationalCommand.cs b/src/EFCore.Relational/Storage/RelationalCommand.cs index 7b711c1ecdc..c1fed8b020b 100644 --- a/src/EFCore.Relational/Storage/RelationalCommand.cs +++ b/src/EFCore.Relational/Storage/RelationalCommand.cs @@ -746,13 +746,13 @@ protected virtual RelationalDataReader CreateRelationalDataReader() => new(this); /// - /// Populates this command from the provided . + /// Populates this command from the provided . /// - /// A template command from which the command text and parameters will be copied. - public virtual void PopulateFromTemplate(IRelationalCommand templateCommand) + /// A template command from which the command text and parameters will be copied. + public virtual void PopulateFrom(IRelationalCommand command) { - CommandText = templateCommand.CommandText; - Parameters = templateCommand.Parameters; + CommandText = command.CommandText; + Parameters = command.Parameters; } } } diff --git a/src/EFCore/ChangeTracking/Internal/StateManager.cs b/src/EFCore/ChangeTracking/Internal/StateManager.cs index f25f0a7cc7b..bd51f1eaf59 100644 --- a/src/EFCore/ChangeTracking/Internal/StateManager.cs +++ b/src/EFCore/ChangeTracking/Internal/StateManager.cs @@ -69,7 +69,7 @@ public StateManager(StateManagerDependencies dependencies) ValueGenerationManager = dependencies.ValueGenerationManager; _model = dependencies.Model; _database = dependencies.Database; - _concurrencyDetector = dependencies.CoreSingletonOptions.IsConcurrencyDetectionEnabled + _concurrencyDetector = dependencies.CoreSingletonOptions.AreThreadSafetyChecksEnabled ? dependencies.ConcurrencyDetector : null; Context = dependencies.CurrentContext.Context; diff --git a/src/EFCore/DbContextOptionsBuilder.cs b/src/EFCore/DbContextOptionsBuilder.cs index a1bf155697c..20df86a6e87 100644 --- a/src/EFCore/DbContextOptionsBuilder.cs +++ b/src/EFCore/DbContextOptionsBuilder.cs @@ -355,8 +355,8 @@ private DbContextOptionsBuilder LogTo(IDbContextLogger logger) /// /// /// The same builder instance so that multiple calls can be chained. - public virtual DbContextOptionsBuilder DisableConcurrencyDetection(bool concurrencyDetectionDisabled = true) - => WithOption(e => e.WithConcurrencyDetectionEnabled(!concurrencyDetectionDisabled)); + public virtual DbContextOptionsBuilder EnableThreadSafetyChecks(bool enableChecks = true) + => WithOption(e => e.WithThreadSafetyChecksEnabled(enableChecks)); /// /// diff --git a/src/EFCore/DbContextOptionsBuilder`.cs b/src/EFCore/DbContextOptionsBuilder`.cs index 4cd9d5d089f..fe9cd378a6f 100644 --- a/src/EFCore/DbContextOptionsBuilder`.cs +++ b/src/EFCore/DbContextOptionsBuilder`.cs @@ -243,8 +243,8 @@ public DbContextOptionsBuilder(DbContextOptions options) /// /// /// The same builder instance so that multiple calls can be chained. - public new virtual DbContextOptionsBuilder DisableConcurrencyDetection(bool concurrencyDetectionDisabled = true) - => (DbContextOptionsBuilder)base.DisableConcurrencyDetection(concurrencyDetectionDisabled); + public new virtual DbContextOptionsBuilder EnableThreadSafetyChecks(bool checksEnabled = true) + => (DbContextOptionsBuilder)base.EnableThreadSafetyChecks(checksEnabled); /// /// diff --git a/src/EFCore/Infrastructure/CoreOptionsExtension.cs b/src/EFCore/Infrastructure/CoreOptionsExtension.cs index d6f4f380d75..30d2ce5095b 100644 --- a/src/EFCore/Infrastructure/CoreOptionsExtension.cs +++ b/src/EFCore/Infrastructure/CoreOptionsExtension.cs @@ -35,7 +35,7 @@ public class CoreOptionsExtension : IDbContextOptionsExtension private IMemoryCache? _memoryCache; private bool _sensitiveDataLoggingEnabled; private bool _detailedErrorsEnabled; - private bool _concurrencyDetectionEnabled = true; + private bool _threadSafetyChecksEnabled = true; private QueryTrackingBehavior _queryTrackingBehavior = QueryTrackingBehavior.TrackAll; private IDictionary<(Type, Type?), Type>? _replacedServices; private int? _maxPoolSize; @@ -79,7 +79,7 @@ protected CoreOptionsExtension(CoreOptionsExtension copyFrom) _memoryCache = copyFrom.MemoryCache; _sensitiveDataLoggingEnabled = copyFrom.IsSensitiveDataLoggingEnabled; _detailedErrorsEnabled = copyFrom.DetailedErrorsEnabled; - _concurrencyDetectionEnabled = copyFrom.ConcurrencyDetectionEnabled; + _threadSafetyChecksEnabled = copyFrom.ThreadSafetyChecksEnabled; _warningsConfiguration = copyFrom.WarningsConfiguration; _queryTrackingBehavior = copyFrom.QueryTrackingBehavior; _maxPoolSize = copyFrom.MaxPoolSize; @@ -230,13 +230,13 @@ public virtual CoreOptionsExtension WithDetailedErrorsEnabled(bool detailedError /// Creates a new instance with all options the same as for this instance, but with the given option changed. /// It is unusual to call this method directly. Instead use . /// - /// The option to change. + /// The option to change. /// A new instance with the option changed. - public virtual CoreOptionsExtension WithConcurrencyDetectionEnabled(bool concurrencyDetectionEnabled) + public virtual CoreOptionsExtension WithThreadSafetyChecksEnabled(bool checksEnabled) { var clone = Clone(); - clone._concurrencyDetectionEnabled = concurrencyDetectionEnabled; + clone._threadSafetyChecksEnabled = checksEnabled; return clone; } @@ -373,10 +373,10 @@ public virtual bool DetailedErrorsEnabled => _detailedErrorsEnabled; /// - /// The option set from the method. + /// The option set from the method. /// - public virtual bool ConcurrencyDetectionEnabled - => _concurrencyDetectionEnabled; + public virtual bool ThreadSafetyChecksEnabled + => _threadSafetyChecksEnabled; /// /// The option set from the method. @@ -562,9 +562,9 @@ public override string LogFragment builder.Append("DetailedErrorsEnabled "); } - if (!Extension._concurrencyDetectionEnabled) + if (!Extension._threadSafetyChecksEnabled) { - builder.Append("ConcurrencyDetectionDisabled "); + builder.Append("ThreadSafetyChecksEnabled "); } if (Extension._maxPoolSize != null) @@ -589,8 +589,8 @@ public override void PopulateDebugInfo(IDictionary debugInfo) Extension._sensitiveDataLoggingEnabled.GetHashCode().ToString(CultureInfo.InvariantCulture); debugInfo["Core:" + nameof(DbContextOptionsBuilder.EnableDetailedErrors)] = Extension._detailedErrorsEnabled.GetHashCode().ToString(CultureInfo.InvariantCulture); - debugInfo["Core:" + nameof(DbContextOptionsBuilder.DisableConcurrencyDetection)] = - (!Extension._concurrencyDetectionEnabled).GetHashCode().ToString(CultureInfo.InvariantCulture); + debugInfo["Core:" + nameof(DbContextOptionsBuilder.EnableThreadSafetyChecks)] = + (!Extension._threadSafetyChecksEnabled).GetHashCode().ToString(CultureInfo.InvariantCulture); debugInfo["Core:" + nameof(DbContextOptionsBuilder.ConfigureWarnings)] = Extension._warningsConfiguration.GetServiceProviderHashCode().ToString(CultureInfo.InvariantCulture); @@ -617,7 +617,7 @@ public override long GetServiceProviderHashCode() var hashCode = Extension.GetMemoryCache()?.GetHashCode() ?? 0L; hashCode = (hashCode * 3) ^ Extension._sensitiveDataLoggingEnabled.GetHashCode(); hashCode = (hashCode * 3) ^ Extension._detailedErrorsEnabled.GetHashCode(); - hashCode = (hashCode * 3) ^ Extension._concurrencyDetectionEnabled.GetHashCode(); + hashCode = (hashCode * 3) ^ Extension._threadSafetyChecksEnabled.GetHashCode(); hashCode = (hashCode * 1073742113) ^ Extension._warningsConfiguration.GetServiceProviderHashCode(); if (Extension._replacedServices != null) diff --git a/src/EFCore/Infrastructure/ICoreSingletonOptions.cs b/src/EFCore/Infrastructure/ICoreSingletonOptions.cs index fdc8cd135ef..a0a98329ac0 100644 --- a/src/EFCore/Infrastructure/ICoreSingletonOptions.cs +++ b/src/EFCore/Infrastructure/ICoreSingletonOptions.cs @@ -24,8 +24,8 @@ public interface ICoreSingletonOptions : ISingletonOptions bool AreDetailedErrorsEnabled { get; } /// - /// Reflects the option set by . + /// Reflects the option set by . /// - bool IsConcurrencyDetectionEnabled { get; } + bool AreThreadSafetyChecksEnabled { get; } } } diff --git a/src/EFCore/Infrastructure/IModelSource.cs b/src/EFCore/Infrastructure/IModelSource.cs index 6033f027b1b..d071eea51cc 100644 --- a/src/EFCore/Infrastructure/IModelSource.cs +++ b/src/EFCore/Infrastructure/IModelSource.cs @@ -31,7 +31,7 @@ public interface IModelSource /// The context the model is being produced for. /// The convention set to use when creating the model. /// The model to be used. - [Obsolete("Use the overload with IModelCreationDependencies")] + [Obsolete("Use the overload with ModelCreationDependencies")] IModel GetModel( DbContext context, IConventionSetBuilder conventionSetBuilder); @@ -43,7 +43,7 @@ IModel GetModel( /// The convention set to use when creating the model. /// The dependencies object for the model. /// The model to be used. - [Obsolete("Use the overload with IModelCreationDependencies")] + [Obsolete("Use the overload with ModelCreationDependencies")] IModel GetModel( DbContext context, IConventionSetBuilder conventionSetBuilder, diff --git a/src/EFCore/Infrastructure/Internal/CoreSingletonOptions.cs b/src/EFCore/Infrastructure/Internal/CoreSingletonOptions.cs index e562d814006..71537f5d30f 100644 --- a/src/EFCore/Infrastructure/Internal/CoreSingletonOptions.cs +++ b/src/EFCore/Infrastructure/Internal/CoreSingletonOptions.cs @@ -34,7 +34,7 @@ public virtual void Initialize(IDbContextOptions options) var coreOptions = options.FindExtension() ?? new CoreOptionsExtension(); AreDetailedErrorsEnabled = coreOptions.DetailedErrorsEnabled; - IsConcurrencyDetectionEnabled = coreOptions.ConcurrencyDetectionEnabled; + AreThreadSafetyChecksEnabled = coreOptions.ThreadSafetyChecksEnabled; } /// @@ -57,13 +57,13 @@ public virtual void Validate(IDbContextOptions options) nameof(DbContextOptionsBuilder.UseInternalServiceProvider))); } - if (IsConcurrencyDetectionEnabled != coreOptions.ConcurrencyDetectionEnabled) + if (AreThreadSafetyChecksEnabled != coreOptions.ThreadSafetyChecksEnabled) { Check.DebugAssert(coreOptions.InternalServiceProvider != null, "InternalServiceProvider is null"); throw new InvalidOperationException( CoreStrings.SingletonOptionChanged( - nameof(DbContextOptionsBuilder.DisableConcurrencyDetection), + nameof(DbContextOptionsBuilder.EnableThreadSafetyChecks), nameof(DbContextOptionsBuilder.UseInternalServiceProvider))); } } @@ -82,6 +82,6 @@ public virtual void Validate(IDbContextOptions options) /// any release. You should only use it directly in your code with extreme caution and knowing that /// doing so can result in application failures when updating to a new Entity Framework Core release. /// - public virtual bool IsConcurrencyDetectionEnabled { get; private set; } + public virtual bool AreThreadSafetyChecksEnabled { get; private set; } } } diff --git a/src/EFCore/Infrastructure/ModelSource.cs b/src/EFCore/Infrastructure/ModelSource.cs index 503fef8d6ad..7efbdcb3ab4 100644 --- a/src/EFCore/Infrastructure/ModelSource.cs +++ b/src/EFCore/Infrastructure/ModelSource.cs @@ -52,7 +52,7 @@ public ModelSource(ModelSourceDependencies dependencies) /// The context the model is being produced for. /// The convention set to use when creating the model. /// The model to be used. - [Obsolete("Use the overload with IModelCreationDependencies")] + [Obsolete("Use the overload with ModelCreationDependencies")] public virtual IModel GetModel( DbContext context, IConventionSetBuilder conventionSetBuilder) @@ -82,7 +82,7 @@ public virtual IModel GetModel( /// The convention set to use when creating the model. /// The dependencies object for the model. /// The model to be used. - [Obsolete("Use the overload with IModelCreationDependencies")] + [Obsolete("Use the overload with ModelCreationDependencies")] public virtual IModel GetModel( DbContext context, IConventionSetBuilder conventionSetBuilder, @@ -146,7 +146,7 @@ public virtual IModel GetModel( /// The context the model is being produced for. /// The convention set to use when creating the model. /// The model to be used. - [Obsolete("Use the overload with IModelCreationDependencies")] + [Obsolete("Use the overload with ModelCreationDependencies")] protected virtual IModel CreateModel( DbContext context, IConventionSetBuilder conventionSetBuilder) diff --git a/src/EFCore/Metadata/IConventionModel.cs b/src/EFCore/Metadata/IConventionModel.cs index bb2ad528e62..1bdd7e817e4 100644 --- a/src/EFCore/Metadata/IConventionModel.cs +++ b/src/EFCore/Metadata/IConventionModel.cs @@ -6,7 +6,6 @@ using System.Linq; using Microsoft.EntityFrameworkCore.Metadata.Builders; using Microsoft.EntityFrameworkCore.Metadata.Conventions; -using Microsoft.EntityFrameworkCore.Metadata.Internal; namespace Microsoft.EntityFrameworkCore.Metadata { diff --git a/test/EFCore.Cosmos.FunctionalTests/ConcurrencyDetectorDisabledCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/ConcurrencyDetectorDisabledCosmosTest.cs index 1f5b9abbef1..3b3d1ae1efe 100644 --- a/test/EFCore.Cosmos.FunctionalTests/ConcurrencyDetectorDisabledCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/ConcurrencyDetectorDisabledCosmosTest.cs @@ -28,7 +28,7 @@ public TestSqlLoggerFactory TestSqlLoggerFactory => (TestSqlLoggerFactory)ListLoggerFactory; public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder) - => builder.DisableConcurrencyDetection(); + => builder.EnableThreadSafetyChecks(enableChecks: false); } } } diff --git a/test/EFCore.InMemory.FunctionalTests/ConcurrencyDetectorDisabledInMemoryTest.cs b/test/EFCore.InMemory.FunctionalTests/ConcurrencyDetectorDisabledInMemoryTest.cs index 6cb77d257d7..8baf5e9a467 100644 --- a/test/EFCore.InMemory.FunctionalTests/ConcurrencyDetectorDisabledInMemoryTest.cs +++ b/test/EFCore.InMemory.FunctionalTests/ConcurrencyDetectorDisabledInMemoryTest.cs @@ -20,7 +20,7 @@ protected override ITestStoreFactory TestStoreFactory => InMemoryTestStoreFactory.Instance; public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder) - => builder.DisableConcurrencyDetection(); + => builder.EnableThreadSafetyChecks(enableChecks: false); } } } diff --git a/test/EFCore.SqlServer.FunctionalTests/ConcurrencyDetectorDisabledSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/ConcurrencyDetectorDisabledSqlServerTest.cs index cc06abd3060..006c762b37e 100644 --- a/test/EFCore.SqlServer.FunctionalTests/ConcurrencyDetectorDisabledSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/ConcurrencyDetectorDisabledSqlServerTest.cs @@ -35,7 +35,7 @@ public TestSqlLoggerFactory TestSqlLoggerFactory => (TestSqlLoggerFactory)ListLoggerFactory; public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder) - => builder.DisableConcurrencyDetection(); + => builder.EnableThreadSafetyChecks(enableChecks: false); } } } diff --git a/test/EFCore.SqlServer.FunctionalTests/TestUtilities/TestRelationalCommandBuilderFactory.cs b/test/EFCore.SqlServer.FunctionalTests/TestUtilities/TestRelationalCommandBuilderFactory.cs index 737b8bd0296..c1c6130235b 100644 --- a/test/EFCore.SqlServer.FunctionalTests/TestUtilities/TestRelationalCommandBuilderFactory.cs +++ b/test/EFCore.SqlServer.FunctionalTests/TestUtilities/TestRelationalCommandBuilderFactory.cs @@ -209,8 +209,8 @@ public async Task ExecuteReaderAsync( public DbCommand CreateDbCommand(RelationalCommandParameterObject parameterObject, Guid commandId, DbCommandMethod commandMethod) => throw new NotSupportedException(); - public void PopulateFromTemplate(IRelationalCommand templateCommand) - => _realRelationalCommand.PopulateFromTemplate(templateCommand); + public void PopulateFrom(IRelationalCommand command) + => _realRelationalCommand.PopulateFrom(command); private int? PreExecution(IRelationalConnection connection) { diff --git a/test/EFCore.SqlServer.Tests/SqlServerDatabaseCreatorTest.cs b/test/EFCore.SqlServer.Tests/SqlServerDatabaseCreatorTest.cs index 5d0b2e85020..76c35543df6 100644 --- a/test/EFCore.SqlServer.Tests/SqlServerDatabaseCreatorTest.cs +++ b/test/EFCore.SqlServer.Tests/SqlServerDatabaseCreatorTest.cs @@ -293,7 +293,7 @@ public Task ExecuteScalarAsync( CancellationToken cancellationToken = default) => throw new NotImplementedException(); - public void PopulateFromTemplate(IRelationalCommand templateCommand) + public void PopulateFrom(IRelationalCommand command) => throw new NotImplementedException(); } } diff --git a/test/EFCore.SqlServer.Tests/SqlServerSequenceValueGeneratorTest.cs b/test/EFCore.SqlServer.Tests/SqlServerSequenceValueGeneratorTest.cs index 2fefa42e9f0..aa4732c5790 100644 --- a/test/EFCore.SqlServer.Tests/SqlServerSequenceValueGeneratorTest.cs +++ b/test/EFCore.SqlServer.Tests/SqlServerSequenceValueGeneratorTest.cs @@ -281,7 +281,7 @@ public Task ExecuteReaderAsync( public DbCommand CreateDbCommand(RelationalCommandParameterObject parameterObject, Guid commandId, DbCommandMethod commandMethod) => throw new NotImplementedException(); - public void PopulateFromTemplate(IRelationalCommand templateCommand) + public void PopulateFrom(IRelationalCommand command) => throw new NotImplementedException(); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/ConcurrencyDetectorDisabledSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/ConcurrencyDetectorDisabledSqliteTest.cs index 9324a469c77..bb5b97dc84a 100644 --- a/test/EFCore.Sqlite.FunctionalTests/ConcurrencyDetectorDisabledSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/ConcurrencyDetectorDisabledSqliteTest.cs @@ -23,7 +23,7 @@ public TestSqlLoggerFactory TestSqlLoggerFactory => (TestSqlLoggerFactory)ListLoggerFactory; public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder) - => builder.DisableConcurrencyDetection(); + => builder.EnableThreadSafetyChecks(enableChecks: false); } } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Query/BadDataSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Query/BadDataSqliteTest.cs index 9c7f9abb53f..4cd713f2336 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Query/BadDataSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Query/BadDataSqliteTest.cs @@ -183,10 +183,10 @@ public override RelationalDataReader ExecuteReader(RelationalCommandParameterObj return reader; } - public override void PopulateFromTemplate(IRelationalCommand templateCommand) + public override void PopulateFrom(IRelationalCommand command) { - base.PopulateFromTemplate(templateCommand); - _values = ((BadDataRelationalCommand)templateCommand)._values; + base.PopulateFrom(command); + _values = ((BadDataRelationalCommand)command)._values; } private class BadDataRelationalDataReader : RelationalDataReader