public ThrowingMonsterStateManager( IInternalEntityEntryFactory factory, IInternalEntityEntrySubscriber subscriber, IInternalEntityEntryNotifier notifier, IValueGenerationManager valueGeneration, IModel model, IDatabase database, IConcurrencyDetector concurrencyDetector, ICurrentDbContext currentContext) : base(factory, subscriber, notifier, valueGeneration, model, database, concurrencyDetector, currentContext) { }
/// <summary> /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// </summary> public virtual IDbContextServices Initialize( IServiceProvider scopedProvider, IDbContextOptions contextOptions, DbContext context) { _scopedProvider = scopedProvider; _contextOptions = contextOptions; _currentContext = new CurrentDbContext(context); _providerServices = new LazyRef<IDatabaseProviderServices>(() => _scopedProvider.GetRequiredService<IDatabaseProviderSelector>().SelectServices()); _modelFromSource = new LazyRef<IModel>(CreateModel); return this; }
public SomeService(ICurrentDbContext context, IStrategy <TEntity> delete = null) => Delete = delete;
public ImpatientQueryCompiler(ICurrentDbContext currentDbContext) { this.currentDbContext = currentDbContext; }
/// <summary> /// Clones this dependency parameter object with one service replaced. /// </summary> /// <param name="currentContext"> A replacement for the current dependency of this type. </param> /// <returns> A new parameter object with the given service replaced. </returns> public RelationalConventionSetBuilderDependencies With([NotNull] ICurrentDbContext currentContext) => new RelationalConventionSetBuilderDependencies(TypeMapper, AnnotationProvider, currentContext, SetFinder);
/// <summary> /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// </summary> public QueryCompilationContextDependencies With([NotNull] ICurrentDbContext currentContext) => new QueryCompilationContextDependencies( Model, Logger, EntityQueryModelVisitorFactory, RequiresMaterializationExpressionVisitorFactory, Check.NotNull(currentContext, nameof(currentContext)));
public DefaultFieldParser(ICurrentDbContext CurrentDbContext, ISqlGenerationHelper SqlGenerationHelper, IDbSetFinder DbSetFinder) { sqlGenerationHelper = SqlGenerationHelper; dbSetFinder = DbSetFinder; context = CurrentDbContext.Context; }
public SqlServerSequenceProvider(ICurrentDbContext context) { this.context = context.Context; }
public TestConventionalSetBuilder(IRelationalTypeMapper typeMapper, ICurrentDbContext currentContext, IDbSetFinder setFinder) : base(typeMapper, currentContext, setFinder) { }
/// <summary> /// Clones this dependency parameter object with one service replaced. /// </summary> /// <param name="currentContext"> A replacement for the current dependency of this type. </param> /// <returns> A new parameter object with the given service replaced. </returns> public ProviderConventionSetBuilderDependencies With([NotNull] ICurrentDbContext currentContext) => new ProviderConventionSetBuilderDependencies( TypeMappingSource, ConstructorBindingFactory, ParameterBindingFactories, MemberClassifier, Logger, ValidationLogger, SetFinder, currentContext, ModelValidator);
public ReadOnlyRepository(ICurrentDbContext database) { _database = database.Context; }
/// <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 BatchExecutor([NotNull] ICurrentDbContext currentContext) { CurrentContext = currentContext; }
public Repository(ICurrentDbContext database) : base(database) { _database = database.Context; }
public SchemaAwareMigrationAssembly(ICurrentDbContext currentContext, IDbContextOptions options, IMigrationsIdGenerator idGenerator, IDiagnosticsLogger <DbLoggerCategory.Migrations> logger, IServiceProvider provider) : base(currentContext, options, idGenerator, logger) { _context = currentContext.Context; _serviceProvider = provider; }
public MigrationFinder(IServiceProvider serviceProvider, ShellContext shellContext, ICurrentDbContext context, IDbContextOptions options, IMigrationsIdGenerator migrationsIdGenerator, IDiagnosticsLogger <DbLoggerCategory.Migrations> logger) : base(context, options, migrationsIdGenerator, logger) { Guard.ArgumentNotNull(context, nameof(context)); _shellContext = shellContext; _serviceProvider = serviceProvider; var contextType = context.Context.GetType(); _migrations = new LazyRef <IReadOnlyDictionary <string, TypeInfo> >( () => { var dic = ( from t in _shellContext.Blueprint.Dependencies.Select(d => d.Type.GetTypeInfo()) where t.IsSubclassOf(typeof(Migration)) && t.GetCustomAttribute <MigrationAttribute>() != null && this.CanApply(t, contextType) let id = t.GetCustomAttribute <MigrationAttribute>()?.Id orderby id select new { Key = id, Element = t }) .ToDictionary(i => i.Key, i => i.Element); return(new ReadOnlyDictionary <string, TypeInfo>(dic)); }); }
/// <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 UpdateAdapterFactory(ICurrentDbContext currentContext) { _currentContext = currentContext; }
public GirvsMigrationByTenantAssembly(ICurrentDbContext currentContext, IDbContextOptions options, IMigrationsIdGenerator idGenerator, IDiagnosticsLogger <DbLoggerCategory.Migrations> logger) : base(currentContext, options, idGenerator, logger) { }
public SpannerBatchExecutor([NotNull] ICurrentDbContext currentContext, [NotNull] IExecutionStrategyFactory executionStrategyFactory) : base(currentContext, executionStrategyFactory) { }
public NpgsqlSequenceProvider(ICurrentDbContext context) { this.context = context.Context; }
public static IDbContextDependencies GetDependencies([NotNull] this ICurrentDbContext currentContext) => currentContext.Context;
#pragma warning restore 618 /// <summary> /// Clones this dependency parameter object with one service replaced. /// </summary> /// <param name="currentContext"> A replacement for the current dependency of this type. </param> /// <returns> A new parameter object with the given service replaced. </returns> public RelationalConventionSetBuilderDependencies With([NotNull] ICurrentDbContext currentContext) #pragma warning disable 618 => new RelationalConventionSetBuilderDependencies(TypeMappingSource, Logger, currentContext, SetFinder, TypeMapper);
public ZStateManager(IInternalEntityEntryFactory factory, IInternalEntityEntrySubscriber subscriber, IInternalEntityEntryNotifier notifier, IValueGenerationManager valueGeneration, IModel model, IDatabase database, IConcurrencyDetector concurrencyDetector, ICurrentDbContext currentContext, ILoggingOptions loggingOptions, IDiagnosticsLogger <DbLoggerCategory.Update> updateLogger) : base(factory, subscriber, notifier, valueGeneration, model, database, concurrencyDetector, currentContext, loggingOptions, updateLogger) { }
/// <summary> /// Clones this dependency parameter object with one service replaced. /// </summary> /// <param name="currentContext"> A replacement for the current dependency of this type. </param> /// <returns> A new parameter object with the given service replaced. </returns> public RelationalConventionSetBuilderDependencies With([NotNull] ICurrentDbContext currentContext) => new RelationalConventionSetBuilderDependencies(TypeMappingSource, Logger, currentContext, SetFinder);
/// <summary> /// Clones this dependency parameter object with one service replaced. /// </summary> /// <param name="currentContext"> A replacement for the current dependency of this type. </param> /// <returns> A new parameter object with the given service replaced. </returns> public CompiledQueryCacheKeyGeneratorDependencies With([NotNull] ICurrentDbContext currentContext) => new CompiledQueryCacheKeyGeneratorDependencies(Model, currentContext);
public NopLazyLoader(ICurrentDbContext currentContext, IDiagnosticsLogger <DbLoggerCategory.Infrastructure> logger) { _currentContext = currentContext; _efCoreLazyLoader = new LazyLoader(currentContext, logger); }
/// <summary> /// Clones this dependency parameter object with one service replaced. /// </summary> /// <param name="currentContext"> A replacement for the current dependency of this type. </param> /// <returns> A new parameter object with the given service replaced. </returns> public QueryContextDependencies With([NotNull] ICurrentDbContext currentContext) => new QueryContextDependencies(currentContext, ExecutionStrategyFactory, ConcurrencyDetector, CommandLogger, QueryLogger);
public NpgsqlModuleHistoryRepository(HistoryRepositoryDependencies dependencies, ICurrentDbContext currentDbContext) : base(dependencies) { var dbContext = currentDbContext.Context as ModuleDbContext; modulePrefix = $"_{dbContext.ModuleMetaInfo.ModuleName}"; }
/// <summary> /// Clones this dependency parameter object with one service replaced. /// </summary> /// <param name="currentDbContext"> A replacement for the current dependency of this type. </param> /// <returns> A new parameter object with the given service replaced. </returns> public ExecutionStrategyDependencies With([NotNull] ICurrentDbContext currentDbContext) => new ExecutionStrategyDependencies(currentDbContext, Options, Logger);
/// <summary> /// Initialize a relational seeder /// </summary> /// <param name="currentDbContext">The current db context</param> /// <param name="seedRepository">The seed repository</param> /// <param name="seedAssembly">The seed assembly</param> /// <param name="seedDependencies">The relational seed dependencies</param> public RelationalSeeder(ICurrentDbContext currentDbContext, ISeedRepository seedRepository, ISeedAssembly seedAssembly, ILoggerFactory loggerFactory, HistoryRepositoryDependencies seedDependencies) : base(currentDbContext, seedRepository, seedAssembly, loggerFactory, seedDependencies.Options) { _seedDependencies = seedDependencies; }
/// <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 BatchExecutor([NotNull] ICurrentDbContext currentContext, [NotNull] IExecutionStrategyFactory executionStrategyFactory) { CurrentContext = currentContext; ExecutionStrategyFactory = executionStrategyFactory; }
/// <summary> /// Clones this dependency parameter object with one service replaced. /// </summary> /// <param name="currentDbContext"> A replacement for the current dependency of this type. </param> /// <returns> A new parameter object with the given service replaced. </returns> public QueryContextDependencies With([NotNull] ICurrentDbContext currentDbContext) => new QueryContextDependencies(currentDbContext, ConcurrencyDetector, CommandLogger, QueryLogger);
public DefaultLolitaUpdateExecutor(ICurrentDbContext CurrentDbContext, ISqlGenerationHelper SqlGenerationHelper, IDbSetFinder DbSetFinder) { sqlGenerationHelper = SqlGenerationHelper; dbSetFinder = DbSetFinder; context = CurrentDbContext.Context; }
public PerDbContextCompiledQueryCache(IDbContextServices contextServices) : base(contextServices) { _currentDbContext = contextServices.CurrentContext; }