public ProviderConventionSetBuilderDependencies( [NotNull] ITypeMappingSource typeMappingSource, [NotNull] IConstructorBindingFactory constructorBindingFactory, [NotNull] IParameterBindingFactories parameterBindingFactories, [NotNull] IMemberClassifier memberClassifier, [NotNull] IDiagnosticsLogger <DbLoggerCategory.Model> logger, [NotNull] IDiagnosticsLogger <DbLoggerCategory.Model.Validation> validationLogger, [NotNull] IDbSetFinder setFinder, [NotNull] ICurrentDbContext currentContext, [NotNull] IModelValidator validator) { Check.NotNull(typeMappingSource, nameof(typeMappingSource)); Check.NotNull(constructorBindingFactory, nameof(constructorBindingFactory)); Check.NotNull(parameterBindingFactories, nameof(parameterBindingFactories)); Check.NotNull(memberClassifier, nameof(memberClassifier)); Check.NotNull(logger, nameof(logger)); Check.NotNull(validationLogger, nameof(validationLogger)); Check.NotNull(setFinder, nameof(setFinder)); Check.NotNull(validator, nameof(validator)); TypeMappingSource = typeMappingSource; ParameterBindingFactories = parameterBindingFactories; MemberClassifier = memberClassifier; ConstructorBindingFactory = constructorBindingFactory; Logger = logger; ValidationLogger = validationLogger; SetFinder = setFinder; _currentContext = currentContext; ModelValidator = validator; }
public SqlServerConventionSetBuilder( [NotNull] IRelationalTypeMapper typeMapper, [CanBeNull] ICurrentDbContext currentContext, [CanBeNull] IDbSetFinder setFinder) : base(typeMapper, currentContext, setFinder) { }
/// <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 DbSetInitializer( IDbSetFinder setFinder, IDbSetSource setSource) { _setFinder = setFinder; _setSource = setSource; }
public ConcreteModelSource(IDbSetFinder setFinder) : base( new ModelSourceDependencies( new ModelCustomizer(new ModelCustomizerDependencies(setFinder)), InMemoryTestHelpers.Instance.CreateContextServices().GetRequiredService <IModelCacheKeyFactory>())) { }
/// <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 DbSetInitializer( [NotNull] IDbSetFinder setFinder, [NotNull] IDbSetSource setSource) { _setFinder = setFinder; _setSource = setSource; }
public MyCatSchemaGenerator(ICurrentDbContext ctx, IDbSetFinder dbSetFinder, IDatabaseProvider myCatDnContext, IDbContextOptions options) { DB = ctx.Context; DbSetFinder = dbSetFinder; MyCatDnContext = myCatDnContext; DbContextOptions = options; }
public ConcreteModelSource(IDbSetFinder setFinder) : base(new ModelSourceDependencies( new CoreConventionSetBuilder(new CoreConventionSetBuilderDependencies(new CoreTypeMapper(new CoreTypeMapperDependencies()))), new ModelCustomizer(new ModelCustomizerDependencies(setFinder)), new ModelCacheKeyFactory(new ModelCacheKeyFactoryDependencies()))) { }
public ConcreteModelSource(IDbSetFinder setFinder) : base( new ModelSourceDependencies( TestServiceFactory.Instance.Create <CoreConventionSetBuilder>(), new ModelCustomizer(new ModelCustomizerDependencies(setFinder)), new ModelCacheKeyFactory(new ModelCacheKeyFactoryDependencies()))) { }
public TestSqliteModelSource( Action<ModelBuilder> onModelCreating, IDbSetFinder setFinder, ICoreConventionSetBuilder coreConventionSetBuilder) : base(setFinder, coreConventionSetBuilder, new ModelCustomizer(), new ModelCacheKeyFactory()) { _testModelSource = new TestModelSource(onModelCreating, setFinder, coreConventionSetBuilder, new ModelCustomizer(), new ModelCacheKeyFactory()); }
public TestInMemoryModelSource( Action <ModelBuilder> onModelCreating, IDbSetFinder setFinder, ICoreConventionSetBuilder coreConventionSetBuilder) : base(setFinder, coreConventionSetBuilder) { _testModelSource = new TestModelSource(onModelCreating, setFinder, coreConventionSetBuilder); }
/// <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 TableNameFromDbSetConvention( [CanBeNull] DbContext context, [CanBeNull] IDbSetFinder setFinder, [NotNull] IDiagnosticsLogger <DbLoggerCategory.Model> logger) { _sets = setFinder?.CreateClrTypeDbSetMapping(context); Logger = logger; }
public MySQLModelSource( IDbSetFinder setFinder, ICoreConventionSetBuilder coreConventionSetBuilder, IModelCustomizer modelCustomizer, IModelCacheKeyFactory modelCacheKeyFactory) : base(setFinder, coreConventionSetBuilder, modelCustomizer, modelCacheKeyFactory) { }
public MyCatModelSource( [NotNull] IDbSetFinder setFinder, [NotNull] ICoreConventionSetBuilder coreConventionSetBuilder, [NotNull] IModelCustomizer modelCustomizer, [NotNull] IModelCacheKeyFactory modelCacheKeyFactory) : base(setFinder, coreConventionSetBuilder, modelCustomizer, modelCacheKeyFactory) { }
public TestModelSource( Action<ModelBuilder> onModelCreating, IDbSetFinder setFinder, ICoreConventionSetBuilder coreConventionSetBuilder) : base(setFinder, coreConventionSetBuilder) { _onModelCreating = onModelCreating; }
public TestInMemoryModelSource( Action<ModelBuilder> onModelCreating, IDbSetFinder setFinder, ICoreConventionSetBuilder coreConventionSetBuilder) : base(setFinder, coreConventionSetBuilder) { _testModelSource = new TestModelSource(onModelCreating, setFinder, coreConventionSetBuilder); }
public TestSqlServerModelSource( Action <ModelBuilder> onModelCreating, IDbSetFinder setFinder, ICoreConventionSetBuilder coreConventionSetBuilder) : base(setFinder, coreConventionSetBuilder, new ModelCustomizer(), new ModelCacheKeyFactory()) { _testModelSource = new TestModelSource(onModelCreating, setFinder, coreConventionSetBuilder, new ModelCustomizer(), new ModelCacheKeyFactory()); }
public RelationalConventionSetBuilderDependencies( [NotNull] IRelationalTypeMapper typeMapper, [CanBeNull] ICurrentDbContext currentContext, [CanBeNull] IDbSetFinder setFinder) : this(setFinder, currentContext, null, typeMapper) { Check.NotNull(typeMapper, nameof(typeMapper)); }
public TestModelSource( Action <ModelBuilder> onModelCreating, IDbSetFinder setFinder, ICoreConventionSetBuilder coreConventionSetBuilder) : base(setFinder, coreConventionSetBuilder) { _onModelCreating = onModelCreating; }
/// <summary> /// <para> /// Creates the service dependencies parameter object for a <see cref="RelationalConventionSetBuilder" />. /// </para> /// <para> /// Do not call this constructor directly from either provider or application code as it may change /// as new dependencies are added. Instead, use this type in your constructor so that an instance /// will be created and injected automatically by the dependency injection container. To create /// an instance with some dependent services replaced, first resolve the object from the dependency /// injection container, then replace selected services using the 'With...' methods. Do not call /// the constructor at any point in this process. /// </para> /// <para> /// 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. /// </para> /// </summary> public RelationalConventionSetBuilderDependencies( [NotNull] IRelationalTypeMapper typeMapper, [CanBeNull] IDiagnosticsLogger <DbLoggerCategory.Model> logger, [CanBeNull] ICurrentDbContext currentContext, [CanBeNull] IDbSetFinder setFinder) : this(setFinder, currentContext, logger, typeMapper) { Check.NotNull(typeMapper, nameof(typeMapper)); }
public DbSetInitializer( [NotNull] IDbSetFinder setFinder, [NotNull] IClrAccessorSource <IClrPropertySetter> setSetters, [NotNull] IDbSetSource setSource) { _setFinder = setFinder; _setSetters = setSetters; _setSource = setSource; }
public MyModelSource(IDbSetFinder setFinder, ICoreConventionSetBuilder coreConventionSetBuilder, IModelCustomizer modelCustomizer, IModelCacheKeyFactory modelCacheKeyFactory) : base(setFinder, coreConventionSetBuilder, modelCustomizer, modelCacheKeyFactory) { }
protected ModelSource( [NotNull] IDbSetFinder setFinder, [NotNull] ICoreConventionSetBuilder coreConventionSetBuilder) { Check.NotNull(setFinder, nameof(setFinder)); Check.NotNull(coreConventionSetBuilder, nameof(coreConventionSetBuilder)); SetFinder = setFinder; CoreConventionSetBuilder = coreConventionSetBuilder; }
/// <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 DbSetInitializer( [NotNull] IDbSetFinder setFinder, [NotNull] IDbSetSource setSource, [NotNull] IDbQuerySource querySource, [NotNull] IDbParameterizedQuerySource parameterizedQuerySource) { _setFinder = setFinder; _setSource = setSource; _querySource = querySource; _parameterizedQuerySource = parameterizedQuerySource; }
/// <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 RelationalConventionSetBuilder( [NotNull] IRelationalTypeMapper typeMapper, [CanBeNull] ICurrentDbContext currentContext, [CanBeNull] IDbSetFinder setFinder) { Check.NotNull(typeMapper, nameof(typeMapper)); _typeMapper = typeMapper; _context = currentContext?.Context; _setFinder = setFinder; }
/// <summary> /// <para> /// Creates the service dependencies parameter object for a <see cref="RelationalConventionSetBuilder" />. /// </para> /// <para> /// Do not call this constructor directly from either provider or application code as it may change /// as new dependencies are added. Instead, use this type in your constructor so that an instance /// will be created and injected automatically by the dependency injection container. To create /// an instance with some dependent services replaced, first resolve the object from the dependency /// injection container, then replace selected services using the 'With...' methods. Do not call /// the constructor at any point in this process. /// </para> /// <para> /// 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. /// </para> /// </summary> public RelationalConventionSetBuilderDependencies( [NotNull] IRelationalTypeMapper typeMapper, [CanBeNull] ICurrentDbContext currentContext, [CanBeNull] IDbSetFinder setFinder) { Check.NotNull(typeMapper, nameof(typeMapper)); TypeMapper = typeMapper; Context = currentContext; SetFinder = setFinder; }
private RelationalConventionSetBuilderDependencies( IDbSetFinder setFinder, ICurrentDbContext currentContext, IDiagnosticsLogger <DbLoggerCategory.Model> logger, IRelationalTypeMapper typeMapper) { TypeMapper = typeMapper; Logger = logger ?? new DiagnosticsLogger <DbLoggerCategory.Model>(new LoggerFactory(), new LoggingOptions(), new DiagnosticListener("")); Context = currentContext; SetFinder = setFinder; }
protected ModelSource([NotNull] IDbSetFinder setFinder, [NotNull] ICoreConventionSetBuilder coreConventionSetBuilder, [NotNull] IModelCustomizer modelCustomizer, [NotNull] IModelCacheKeyFactory modelCacheKeyFactory) { Check.NotNull(setFinder, nameof(setFinder)); Check.NotNull(coreConventionSetBuilder, nameof(coreConventionSetBuilder)); Check.NotNull(modelCustomizer, nameof(modelCustomizer)); Check.NotNull(modelCacheKeyFactory, nameof(modelCacheKeyFactory)); SetFinder = setFinder; CoreConventionSetBuilder = coreConventionSetBuilder; ModelCustomizer = modelCustomizer; ModelCacheKeyFactory = modelCacheKeyFactory; }
/// <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 TableNameFromDbSetConvention( [CanBeNull] DbContext context, [CanBeNull] IDbSetFinder setFinder, [NotNull] IDiagnosticsLogger <DbLoggerCategory.Model> logger) { _sets = context != null && setFinder != null ? setFinder.CreateClrTypeDbSetMapping(context) : new Dictionary <Type, DbSetProperty>(); Logger = logger; }
public TestModelSource( Action <ModelBuilder> onModelCreating, IDbSetFinder setFinder, ICoreConventionSetBuilder coreConventionSetBuilder) : base( new ModelSourceDependencies( setFinder, coreConventionSetBuilder, new ModelCustomizer(new ModelCustomizerDependencies()), new ModelCacheKeyFactory(new ModelCacheKeyFactoryDependencies()))) { _onModelCreating = onModelCreating; }
/// <summary> /// <para> /// Creates the service dependencies parameter object for a <see cref="RelationalConventionSetBuilder" />. /// </para> /// <para> /// Do not call this constructor directly from either provider or application code as it may change /// as new dependencies are added. Instead, use this type in your constructor so that an instance /// will be created and injected automatically by the dependency injection container. To create /// an instance with some dependent services replaced, first resolve the object from the dependency /// injection container, then replace selected services using the 'With...' methods. Do not call /// the constructor at any point in this process. /// </para> /// <para> /// 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. /// </para> /// </summary> public RelationalConventionSetBuilderDependencies( [NotNull] IRelationalTypeMappingSource typeMappingSource, [CanBeNull] IDiagnosticsLogger <DbLoggerCategory.Model> logger, [CanBeNull] ICurrentDbContext currentContext, [CanBeNull] IDbSetFinder setFinder) { Check.NotNull(typeMappingSource, nameof(typeMappingSource)); TypeMappingSource = typeMappingSource; Logger = logger ?? new DiagnosticsLogger <DbLoggerCategory.Model>(new LoggerFactory(), new LoggingOptions(), new DiagnosticListener("")); Context = currentContext; SetFinder = setFinder; }
/// <summary> /// <para> /// Creates the service dependencies parameter object for a <see cref="ProviderConventionSetBuilder" />. /// </para> /// <para> /// Do not call this constructor directly from either provider or application code as it may change /// as new dependencies are added. Instead, use this type in your constructor so that an instance /// will be created and injected automatically by the dependency injection container. To create /// an instance with some dependent services replaced, first resolve the object from the dependency /// injection container, then replace selected services using the 'With...' methods. Do not call /// the constructor at any point in this process. /// </para> /// <para> /// 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. /// </para> /// </summary> /// <param name="typeMappingSource"> The type mapping source. </param> /// <param name="constructorBindingFactory"> The constructor binding factory. </param> /// <param name="parameterBindingFactories"> The parameter binding factories. </param> /// <param name="memberClassifier"> The member classifier. </param> /// <param name="logger"> The model logger. </param> /// <param name="setFinder"> The set finder. </param> /// <param name="context"> The current context instance. </param> public ProviderConventionSetBuilderDependencies( [NotNull] ITypeMappingSource typeMappingSource, [CanBeNull] IConstructorBindingFactory constructorBindingFactory, [CanBeNull] IParameterBindingFactories parameterBindingFactories, [CanBeNull] IMemberClassifier memberClassifier, [CanBeNull] IDiagnosticsLogger <DbLoggerCategory.Model> logger, [CanBeNull] IDbSetFinder setFinder, [CanBeNull] ICurrentDbContext context) { Check.NotNull(typeMappingSource, nameof(typeMappingSource)); TypeMappingSource = typeMappingSource; if (parameterBindingFactories == null) { parameterBindingFactories = new ParameterBindingFactories( null, new RegisteredServices(Enumerable.Empty <Type>())); } ParameterBindingFactories = parameterBindingFactories; if (memberClassifier == null) { memberClassifier = new MemberClassifier( typeMappingSource, parameterBindingFactories); } MemberClassifier = memberClassifier; if (constructorBindingFactory == null) { ConstructorBindingFactory = new ConstructorBindingFactory( new PropertyParameterBindingFactory(), parameterBindingFactories); } ConstructorBindingFactory = constructorBindingFactory; Logger = logger ?? new DiagnosticsLogger <DbLoggerCategory.Model>( new ScopedLoggerFactory(new LoggerFactory(), dispose: true), new LoggingOptions(), new DiagnosticListener(""), new LoggingDefinitions()); SetFinder = setFinder; Context = context; }
public MongoDbModelSource( [NotNull] IDbSetFinder setFinder, [NotNull] ICoreConventionSetBuilder coreConventionSetBuilder, [NotNull] IModelCustomizer modelCustomizer, [NotNull] IModelCacheKeyFactory modelCacheKeyFactory) : base( Check.NotNull(setFinder, nameof(setFinder)), Check.NotNull(coreConventionSetBuilder, nameof(coreConventionSetBuilder)), Check.NotNull(modelCustomizer, nameof(modelCustomizer)), Check.NotNull(modelCacheKeyFactory, nameof(modelCacheKeyFactory))) { }
/// <summary> /// <para> /// Creates the service dependencies parameter object for a <see cref="RelationalConventionSetBuilder" />. /// </para> /// <para> /// Do not call this constructor directly from either provider or application code as it may change /// as new dependencies are added. Instead, use this type in your constructor so that an instance /// will be created and injected automatically by the dependency injection container. To create /// an instance with some dependent services replaced, first resolve the object from the dependency /// injection container, then replace selected services using the 'With...' methods. Do not call /// the constructor at any point in this process. /// </para> /// <para> /// 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. /// </para> /// </summary> public RelationalConventionSetBuilderDependencies( [NotNull] IRelationalCoreTypeMapper coreTypeMapper, [CanBeNull] IDiagnosticsLogger <DbLoggerCategory.Model> logger, [CanBeNull] ICurrentDbContext currentContext, [CanBeNull] IDbSetFinder setFinder, [CanBeNull] IRelationalTypeMapper _ = null) // Only needed for D.I. to resolve this constructor { Check.NotNull(coreTypeMapper, nameof(coreTypeMapper)); CoreTypeMapper = coreTypeMapper; Logger = logger ?? new DiagnosticsLogger <DbLoggerCategory.Model>(new LoggerFactory(), new LoggingOptions(), new DiagnosticListener("")); Context = currentContext; SetFinder = setFinder; }
public RelationalConventionSetBuilderDependencies( [NotNull] IRelationalTypeMapper typeMapper, [CanBeNull] ICurrentDbContext currentContext, [CanBeNull] IDbSetFinder setFinder) : this( new FallbackRelationalCoreTypeMapper( new CoreTypeMapperDependencies( new ValueConverterSelector( new ValueConverterSelectorDependencies())), new RelationalTypeMapperDependencies(), typeMapper), null, currentContext, setFinder) { }
public TestConventionalSetBuilder(IRelationalTypeMapper typeMapper, ICurrentDbContext currentContext, IDbSetFinder setFinder) : base(typeMapper, currentContext, setFinder) { }
public ConcreteModelSource(IDbSetFinder setFinder) : base(setFinder, new CoreConventionSetBuilder(), new ModelCustomizer(), new ModelCacheKeyFactory()) { }
public MaterializingSqlServerModelSource(IDbSetFinder setFinder, ICoreConventionSetBuilder coreConventionSetBuilder, IModelCustomizer modelCustomizer, IModelCacheKeyFactory modelCacheKeyFactory) : base(setFinder, coreConventionSetBuilder, modelCustomizer, modelCacheKeyFactory) { }
public MyModelSource( IDbSetFinder setFinder, ICoreConventionSetBuilder coreConventionSetBuilder) : base(setFinder, coreConventionSetBuilder) { }
private IModelSource CreateDefaultModelSource(IDbSetFinder setFinder) => new ConcreteModelSource(setFinder);
private IModelSource CreateDefaultModelSource(IDbSetFinder setFinder) => new ConcreteModelSource(setFinder, Mock.Of<IModelValidator>());
public TestModelSource(Action<ModelBuilder> onModelCreating, IDbSetFinder setFinder) : base(setFinder, new ThrowingModelValidator()) { _onModelCreating = onModelCreating; }
public ConcreteModelSource(IDbSetFinder setFinder) : base(setFinder, new CoreConventionSetBuilder()) { }
public ConcreteModelSource(IDbSetFinder setFinder, IModelValidator modelValidator) : base(setFinder, modelValidator) { }
public TestInMemoryModelSource(Action<ModelBuilder> onModelCreating, IDbSetFinder setFinder, IModelValidator modelValidator) : base(setFinder, modelValidator) { _testModelSource = new TestModelSource(onModelCreating, setFinder); }
public TestModelSource(Action<ModelBuilder> onModelCreating, IDbSetFinder setFinder, ICoreConventionSetBuilder coreConventionSetBuilder, IModelCustomizer modelCustomizer, IModelCacheKeyFactory modelCacheKeyFactory) : base(setFinder, coreConventionSetBuilder, modelCustomizer, modelCacheKeyFactory) { _onModelCreating = onModelCreating; }