public QueryCompilationContextDependencies( [NotNull] IModel model, [NotNull] IQueryTranslationPreprocessorFactory queryTranslationPreprocessorFactory, [NotNull] IQueryableMethodTranslatingExpressionVisitorFactory queryableMethodTranslatingExpressionVisitorFactory, [NotNull] IQueryTranslationPostprocessorFactory queryTranslationPostprocessorFactory, [NotNull] IShapedQueryCompilingExpressionVisitorFactory shapedQueryCompilingExpressionVisitorFactory, [NotNull] IExecutionStrategyFactory executionStrategyFactory, [NotNull] ICurrentDbContext currentContext, [NotNull] IDbContextOptions contextOptions, [NotNull] IDiagnosticsLogger <DbLoggerCategory.Query> logger) { Check.NotNull(model, nameof(model)); Check.NotNull(queryTranslationPreprocessorFactory, nameof(queryTranslationPreprocessorFactory)); Check.NotNull(queryableMethodTranslatingExpressionVisitorFactory, nameof(queryableMethodTranslatingExpressionVisitorFactory)); Check.NotNull(queryTranslationPostprocessorFactory, nameof(queryTranslationPostprocessorFactory)); Check.NotNull(shapedQueryCompilingExpressionVisitorFactory, nameof(shapedQueryCompilingExpressionVisitorFactory)); Check.NotNull(executionStrategyFactory, nameof(executionStrategyFactory)); Check.NotNull(currentContext, nameof(currentContext)); Check.NotNull(contextOptions, nameof(contextOptions)); Check.NotNull(logger, nameof(logger)); _currentContext = currentContext; Model = model; QueryTranslationPreprocessorFactory = queryTranslationPreprocessorFactory; QueryableMethodTranslatingExpressionVisitorFactory = queryableMethodTranslatingExpressionVisitorFactory; QueryTranslationPostprocessorFactory = queryTranslationPostprocessorFactory; ShapedQueryCompilingExpressionVisitorFactory = shapedQueryCompilingExpressionVisitorFactory; _executionStrategyFactory = executionStrategyFactory; IsRetryingExecutionStrategy = executionStrategyFactory.Create().RetriesOnFailure; ContextOptions = contextOptions; Logger = logger; }
public CompiledQueryCacheKeyGeneratorDependencies( [NotNull] IModel model, [NotNull] ICurrentDbContext currentContext, [NotNull] IExecutionStrategyFactory executionStrategyFactory) { Check.NotNull(model, nameof(model)); Check.NotNull(currentContext, nameof(currentContext)); Check.NotNull(executionStrategyFactory, nameof(executionStrategyFactory)); Model = model; CurrentContext = currentContext; _executionStrategyFactory = executionStrategyFactory; IsRetryingExecutionStrategy = executionStrategyFactory.Create().RetriesOnFailure; }
/// <summary> /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to /// the same compatibility standards as public APIs. It may be changed or removed without notice in /// 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. /// </summary> public virtual bool CreateDatabaseIfNotExists() => _executionStrategyFactory.Create().Execute( (object)null, CreateDatabaseIfNotExistsOnce, null);
/// <summary> /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to /// the same compatibility standards as public APIs. It may be changed or removed without notice in /// 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. /// </summary> public virtual bool CreateDatabaseIfNotExists(ThroughputProperties?throughput) => _executionStrategyFactory.Create().Execute( throughput, CreateDatabaseIfNotExistsOnce, null);