/// <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 SqliteRelationalConnection( [NotNull] RelationalConnectionDependencies dependencies, [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder) : base(dependencies) { Check.NotNull(rawSqlCommandBuilder, nameof(rawSqlCommandBuilder)); _rawSqlCommandBuilder = rawSqlCommandBuilder; var optionsExtension = dependencies.ContextOptions.Extensions.OfType <SqliteOptionsExtension>().FirstOrDefault(); if (optionsExtension != null) { _loadSpatialite = optionsExtension.LoadSpatialite; if (_loadSpatialite) { var relationalOptions = RelationalOptionsExtension.Extract(dependencies.ContextOptions); if (relationalOptions.Connection != null) { // TODO: Provide a better hook to do this for both external connections and ones created by EF SpatialiteLoader.Load((SqliteConnection)relationalOptions.Connection); } } } }
public OracleRelationalConnection( [NotNull] RelationalConnectionDependencies dependencies, [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder) : base(dependencies) { _rawSqlCommandBuilder = rawSqlCommandBuilder; }
/// <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 SqliteRelationalConnection( RelationalConnectionDependencies dependencies, IRawSqlCommandBuilder rawSqlCommandBuilder, IDiagnosticsLogger <DbLoggerCategory.Infrastructure> logger) : base(dependencies) { Check.NotNull(rawSqlCommandBuilder, nameof(rawSqlCommandBuilder)); _rawSqlCommandBuilder = rawSqlCommandBuilder; _logger = logger; var optionsExtension = dependencies.ContextOptions.Extensions.OfType <SqliteOptionsExtension>().FirstOrDefault(); if (optionsExtension != null) { _loadSpatialite = optionsExtension.LoadSpatialite; var relationalOptions = RelationalOptionsExtension.Extract(dependencies.ContextOptions); _commandTimeout = relationalOptions.CommandTimeout; if (relationalOptions.Connection != null) { InitializeDbConnection(relationalOptions.Connection); } } }
// ReSharper disable once VirtualMemberCallInConstructor public MySqlRelationalConnection( [NotNull] RelationalConnectionDependencies dependencies, IServiceProvider serviceProvider) : base(dependencies) { _serviceProvider = serviceProvider; _mySqlOptionsExtension = Dependencies.ContextOptions.FindExtension <MySqlOptionsExtension>() ?? new MySqlOptionsExtension(); }
public ExtensionsSqlServerConnection(RelationalConnectionDependencies dependencies , ISqlCommandCatchingStore catchingStore , ISqlCommandCatchingState catchingState) : base(dependencies) { _catchingStore = catchingStore; _catchingState = catchingState; }
public NpgsqlRelationalConnection([NotNull] RelationalConnectionDependencies dependencies) : base(dependencies) { var npgsqlOptions = dependencies.ContextOptions.Extensions.OfType <NpgsqlOptionsExtension>().FirstOrDefault(); ProvideClientCertificatesCallback = npgsqlOptions.ProvideClientCertificatesCallback; RemoteCertificateValidationCallback = npgsqlOptions.RemoteCertificateValidationCallback; }
public CassandraHistoryRepository(RelationalConnectionDependencies relationalConnectionDependencies, HistoryRepositoryDependencies dependencies) { var cassandraOptionsExtension = CassandraOptionsExtension.Extract(relationalConnectionDependencies.ContextOptions); Dependencies = dependencies; var relationalOptions = RelationalOptionsExtension.Extract(dependencies.Options); TableName = relationalOptions?.MigrationsHistoryTableName ?? DefaultTableName; TableSchema = cassandraOptionsExtension.DefaultKeyspace; EnsureModel(); }
/// <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 JetRelationalConnection([NotNull] RelationalConnectionDependencies dependencies) : base(dependencies) { _jetOptionsExtension = dependencies.ContextOptions.FindExtension <JetOptionsExtension>() ?? new JetOptionsExtension(); if (_jetOptionsExtension.DataAccessProviderFactory == null && ((JetConnection)DbConnection)?.DataAccessProviderFactory == null) { throw new InvalidOperationException(JetStrings.DataAccessProviderFactory); } }
/// <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 SqliteRelationalConnection( [NotNull] RelationalConnectionDependencies dependencies, [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder) : base(dependencies) { Check.NotNull(rawSqlCommandBuilder, nameof(rawSqlCommandBuilder)); _rawSqlCommandBuilder = rawSqlCommandBuilder; var optionsExtension = dependencies.ContextOptions.Extensions.OfType <SqliteOptionsExtension>().FirstOrDefault(); if (optionsExtension != null) { _enforceForeignKeys = optionsExtension.EnforceForeignKeys; } }
private static MySQLServerConnection CreateConnection(IDbContextOptions options, ILogger logger) { var dependencies = new RelationalConnectionDependencies( options, new DiagnosticsLogger <DbLoggerCategory.Database.Transaction>( new LoggerFactory(), new LoggingOptions(), new DiagnosticListener("MySqlDiagnosticListener")), new DiagnosticsLogger <DbLoggerCategory.Database.Connection>( new LoggerFactory(), new LoggingOptions(), new DiagnosticListener("MySqlDiagnosticListener")), new NamedConnectionStringResolver(options), new RelationalTransactionFactory(new RelationalTransactionFactoryDependencies())); return(new MySQLServerConnection(dependencies)); }
/// <summary> /// 实例化 /// </summary> /// <param name="dependencies">关系连接依赖</param> /// <param name="logger">日志</param> public OracleRelationalConnection( [NotNull] RelationalConnectionDependencies dependencies, IDiagnosticsLogger <DbLoggerCategory.Database.Connection> logger = null) : base(dependencies) { if (Check.IsTraceEnabled(logger?.Logger)) { Trace <DbLoggerCategory.Database.Connection> .Write(logger, LogLevel.Trace, OracleTraceTag.Entry, OracleTraceClassName.OracleRelationalConnection, OracleTraceFuncName.ctor); } m_oracleLogger = logger; if (Check.IsTraceEnabled(logger?.Logger)) { Trace <DbLoggerCategory.Database.Connection> .Write(m_oracleLogger, LogLevel.Trace, OracleTraceTag.Exit, OracleTraceClassName.OracleRelationalConnection, OracleTraceFuncName.ctor); } }
/// <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 TaosRelationalConnection( [NotNull] RelationalConnectionDependencies dependencies, [NotNull] IRawSqlCommandBuilder rawSqlCommandBuilder) : base(dependencies) { Check.NotNull(rawSqlCommandBuilder, nameof(rawSqlCommandBuilder)); _rawSqlCommandBuilder = rawSqlCommandBuilder; var optionsExtension = dependencies.ContextOptions.Extensions.OfType <TaosOptionsExtension>().FirstOrDefault(); if (optionsExtension != null) { var relationalOptions = RelationalOptionsExtension.Extract(dependencies.ContextOptions); _connection = new TaosConnection(relationalOptions.ConnectionString); } }
public TestNpgsqlConnection(RelationalConnectionDependencies dependencies) : base(dependencies) { }
// ReSharper disable once VirtualMemberCallInConstructor public MySqlRelationalConnection( [NotNull] RelationalConnectionDependencies dependencies) : base(dependencies) { _mySqlOptionsExtension = Dependencies.ContextOptions.FindExtension <MySqlOptionsExtension>() ?? new MySqlOptionsExtension(); }
/// <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 SqlServerConnection([NotNull] RelationalConnectionDependencies dependencies) : base(dependencies) { }
public CassandraRelationalConnection(RelationalConnectionDependencies dependencies) : base(dependencies) { }
/// <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 EfAseConnection(RelationalConnectionDependencies dependencies) : base(dependencies) { }
public CustomMySqlRelationalConnection(RelationalConnectionDependencies dependencies) : base(dependencies) { }
public FakeSqlServerConnection(IDbContextOptions options, RelationalConnectionDependencies dependencies) : base(dependencies) { _options = options; }
public OracleRelationalConnection([NotNull] RelationalConnectionDependencies dependencies) : base(dependencies) { }
public TestSqlServerConnection(RelationalConnectionDependencies dependencies) : base(dependencies) { }
public CassandraMigrationsModelDiffer(RelationalConnectionDependencies relationalConnectionDependencies, IRelationalTypeMappingSource typeMappingSource, IMigrationsAnnotationProvider migrationsAnnotations, IChangeDetector changeDetector, IUpdateAdapterFactory updateAdapterFactory, CommandBatchPreparerDependencies commandBatchPreparerDependencies) : base(typeMappingSource, migrationsAnnotations, changeDetector, updateAdapterFactory, commandBatchPreparerDependencies) { _cassandraOptionsExtension = CassandraOptionsExtension.Extract(relationalConnectionDependencies.ContextOptions); }
public TestSpannerConnection(RelationalConnectionDependencies dependencies) : this(new SpannerRelationalConnection(dependencies)) { }
public EFCassandraDbConnection(ICurrentDbContext currentDbContext, string connectionString, RelationalConnectionDependencies dependencies) : base(connectionString) { _currentDbContext = currentDbContext; _cassandraOptionsExtension = CassandraOptionsExtension.Extract(dependencies.ContextOptions); _connectionStringBuilder = new CassandraConnectionStringBuilder(connectionString); }
/// <summary> /// </summary> /// <param name="dependencies"></param> public SpannerRelationalConnection(RelationalConnectionDependencies dependencies) : base(dependencies) { }
public MySqlRelationalConnection([NotNull] RelationalConnectionDependencies dependencies) : base(dependencies) { }
public CassandraDatabaseCreator(IRelationalConnection relationalConnection, IRawSqlCommandBuilder rawCommandBuilder, RelationalConnectionDependencies relationalConnectionDependencies, RelationalDatabaseCreatorDependencies dependencies) : base(dependencies) { _relationalConnection = relationalConnection; _rawSqlCommandBuilder = rawCommandBuilder; _relationalConnectionDependencies = relationalConnectionDependencies; }
public ClickHouseRelationalConnection(RelationalConnectionDependencies dependencies) : base(dependencies) { }
public CustomSqliteRelationalConnection(RelationalConnectionDependencies dependencies, IRawSqlCommandBuilder rawSqlCommandBuilder) : base(dependencies, rawSqlCommandBuilder) { }
public JsonRelationalConnection(RelationalConnectionDependencies dependencies) : base(dependencies) { Console.WriteLine("JsonRelationalConnection"); }