/// <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 DbContextDependencies( [NotNull] IChangeDetector changeDetector, [NotNull] IDbSetInitializer dbSetInitializer, [NotNull] IEntityFinderSource entityFinderSource, [NotNull] IEntityGraphAttacher entityGraphAttacher, [NotNull] IModel model, [NotNull] IAsyncQueryProvider queryProvider, [NotNull] IStateManager stateManager) { Check.NotNull(changeDetector, nameof(changeDetector)); Check.NotNull(dbSetInitializer, nameof(dbSetInitializer)); Check.NotNull(entityFinderSource, nameof(entityFinderSource)); Check.NotNull(entityGraphAttacher, nameof(entityGraphAttacher)); Check.NotNull(model, nameof(model)); Check.NotNull(queryProvider, nameof(queryProvider)); Check.NotNull(stateManager, nameof(stateManager)); ChangeDetector = changeDetector; DbSetInitializer = dbSetInitializer; EntityFinderSource = entityFinderSource; EntityGraphAttacher = entityGraphAttacher; Model = model; QueryProvider = queryProvider; StateManager = stateManager; }
public StateManagerDependencies( [NotNull] IInternalEntityEntryFactory internalEntityEntryFactory, [NotNull] IInternalEntityEntrySubscriber internalEntityEntrySubscriber, [NotNull] IInternalEntityEntryNotifier internalEntityEntryNotifier, [NotNull] IValueGenerationManager valueGenerationManager, [NotNull] IModel model, [NotNull] IDatabase database, [NotNull] IConcurrencyDetector concurrencyDetector, [NotNull] ICurrentDbContext currentContext, [NotNull] IEntityFinderSource entityFinderSource, [NotNull] IDbSetSource setSource, [NotNull] IEntityMaterializerSource entityMaterializerSource, [NotNull] IExecutionStrategyFactory executionStrategyFactory, [NotNull] ILoggingOptions loggingOptions, [NotNull] IDiagnosticsLogger <DbLoggerCategory.Update> updateLogger, [NotNull] IDiagnosticsLogger <DbLoggerCategory.ChangeTracking> changeTrackingLogger) { InternalEntityEntryFactory = internalEntityEntryFactory; InternalEntityEntrySubscriber = internalEntityEntrySubscriber; InternalEntityEntryNotifier = internalEntityEntryNotifier; ValueGenerationManager = valueGenerationManager; Model = model; Database = database; ConcurrencyDetector = concurrencyDetector; CurrentContext = currentContext; EntityFinderSource = entityFinderSource; SetSource = setSource; EntityMaterializerSource = entityMaterializerSource; ExecutionStrategyFactory = executionStrategyFactory; LoggingOptions = loggingOptions; UpdateLogger = updateLogger; ChangeTrackingLogger = changeTrackingLogger; }
/// <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 EntityFinderFactory( IEntityFinderSource entityFinderSource, IStateManager stateManager, IDbSetSource setSource, IDbSetCache setCache) { _entityFinderSource = entityFinderSource; _stateManager = stateManager; _setSource = setSource; _setCache = setCache; }
/// <summary> /// Clones this dependency parameter object with one service replaced. /// </summary> /// <param name="entityFinderSource"> A replacement for the current dependency of this type. </param> /// <returns> A new parameter object with the given service replaced. </returns> public StateManagerDependencies With([NotNull] IEntityFinderSource entityFinderSource) => new StateManagerDependencies( InternalEntityEntryFactory, InternalEntityEntrySubscriber, InternalEntityEntryNotifier, ValueGenerationManager, Model, Database, ConcurrencyDetector, CurrentContext, entityFinderSource, SetSource, EntityMaterializerSource, LoggingOptions, UpdateLogger);
/// <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 DbContextDependencies( [NotNull] IChangeDetector changeDetector, [NotNull] IDbSetSource setSource, [NotNull] IEntityFinderSource entityFinderSource, [NotNull] IEntityGraphAttacher entityGraphAttacher, [NotNull] IModel model, [NotNull] IAsyncQueryProvider queryProvider, [NotNull] IStateManager stateManager, [NotNull] IDiagnosticsLogger <DbLoggerCategory.Update> updateLogger, [NotNull] IDiagnosticsLogger <DbLoggerCategory.Infrastructure> infrastuctureLogger) { ChangeDetector = changeDetector; SetSource = setSource; EntityFinderSource = entityFinderSource; EntityGraphAttacher = entityGraphAttacher; Model = model; QueryProvider = queryProvider; StateManager = stateManager; UpdateLogger = updateLogger; InfrastructureLogger = infrastuctureLogger; }
/// <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> protected virtual IEntityFinder Finder([NotNull] Type entityType) => (_entityFinderSource ?? (_entityFinderSource = InternalEntry.StateManager.Context.GetService <IEntityFinderSource>())) .Create(InternalEntry.StateManager.Context, entityType);
public DbContextDependenciesEx(ICurrentDbContext currentContext, IChangeDetector changeDetector, IDbSetSource setSource, IEntityFinderSource entityFinderSource, IEntityGraphAttacher entityGraphAttacher, IModel model, IAsyncQueryProvider queryProvider, IStateManager stateManager, IDiagnosticsLogger <DbLoggerCategory.Update> updateLogger, IDiagnosticsLogger <DbLoggerCategory.Infrastructure> infrastructureLogger) { inner = new DbContextDependencies(currentContext, changeDetector, setSource, entityFinderSource, entityGraphAttacher, model, queryProvider, new StateManagerWrapper(stateManager), updateLogger, infrastructureLogger); }