public static SqlServerSqlDatabaseContext Create(SqlServerSqlDatabaseContextInfo contextInfo, DataAccessModel model) { var constraintDefaults = model.Configuration.ConstraintDefaultsConfiguration; var sqlDataTypeProvider = CreateSqlDataTypeProvider(model, contextInfo, () => new SqlServerSqlDataTypeProvider(constraintDefaults)); var sqlDialect = new SqlServerSqlDialect(contextInfo); var typeDescriptorProvider = model.TypeDescriptorProvider; var sqlQueryFormatterManager = new DefaultSqlQueryFormatterManager(sqlDialect, model.Configuration.NamingTransforms, (options, connection) => new SqlServerSqlQueryFormatter(options, sqlDialect, sqlDataTypeProvider, typeDescriptorProvider, contextInfo, ((SqlConnection)connection)?.ServerVersion)); return(new SqlServerSqlDatabaseContext(model, sqlDataTypeProvider, sqlQueryFormatterManager, contextInfo)); }
public static SqlServerSqlDatabaseContext Create(SqlServerSqlDatabaseContextInfo contextInfo, DataAccessModel model) { var constraintDefaults = model.Configuration.ConstraintDefaultsConfiguration; var sqlDataTypeProvider = new SqlServerSqlDataTypeProvider(constraintDefaults); var sqlDialect = new SqlServerSqlDialect(contextInfo); var typeDescriptorProvider = model.TypeDescriptorProvider; var sqlQueryFormatterManager = new DefaultSqlQueryFormatterManager(sqlDialect, options => new SqlServerSqlQueryFormatter(options, sqlDialect, sqlDataTypeProvider, typeDescriptorProvider)); return new SqlServerSqlDatabaseContext(model, sqlDataTypeProvider, sqlQueryFormatterManager, contextInfo); }
public static SqlServerSqlDatabaseContext Create(SqlServerSqlDatabaseContextInfo contextInfo, DataAccessModel model) { var constraintDefaults = model.Configuration.ConstraintDefaultsConfiguration; var sqlDataTypeProvider = new SqlServerSqlDataTypeProvider(constraintDefaults); var sqlDialect = new SqlServerSqlDialect(contextInfo); var typeDescriptorProvider = model.TypeDescriptorProvider; var sqlQueryFormatterManager = new DefaultSqlQueryFormatterManager(sqlDialect, options => new SqlServerSqlQueryFormatter(options, sqlDialect, sqlDataTypeProvider, typeDescriptorProvider)); return(new SqlServerSqlDatabaseContext(model, sqlDataTypeProvider, sqlQueryFormatterManager, contextInfo)); }