예제 #1
0
 private static SqlOperation SetReadCommittedSnapshotOn(
     SqlServerMigrationOperationSqlGenerator sqlGenerator, string databaseName)
 {
     return(new SqlOperation(
                string.Concat(
                    "IF SERVERPROPERTY('EngineEdition') <> 5 EXECUTE sp_executesql N",
                    sqlGenerator.GenerateLiteral(
                        string.Concat(
                            "ALTER DATABASE ",
                            sqlGenerator.DelimitIdentifier(databaseName),
                            " SET READ_COMMITTED_SNAPSHOT ON")))));
 }
예제 #2
0
        public SqlServerDataStoreCreator(
            [NotNull] SqlServerConnection connection,
            [NotNull] ModelDiffer modelDiffer,
            [NotNull] SqlServerMigrationOperationSqlGenerator sqlGenerator,
            [NotNull] SqlStatementExecutor statementExecutor)
        {
            Check.NotNull(connection, "connection");
            Check.NotNull(modelDiffer, "modelDiffer");
            Check.NotNull(sqlGenerator, "sqlGenerator");
            Check.NotNull(statementExecutor, "statementExecutor");

            _connection        = connection;
            _modelDiffer       = modelDiffer;
            _sqlGenerator      = sqlGenerator;
            _statementExecutor = statementExecutor;
        }
        public SqlServerDataStoreCreator(
            [NotNull] SqlServerConnection connection,
            [NotNull] ModelDiffer modelDiffer,
            [NotNull] SqlServerMigrationOperationSqlGenerator sqlGenerator,
            [NotNull] SqlStatementExecutor statementExecutor)
        {
            Check.NotNull(connection, "connection");
            Check.NotNull(modelDiffer, "modelDiffer");
            Check.NotNull(sqlGenerator, "sqlGenerator");
            Check.NotNull(statementExecutor, "statementExecutor");

            _connection = connection;
            _modelDiffer = modelDiffer;
            _sqlGenerator = sqlGenerator;
            _statementExecutor = statementExecutor;
        }
            public Context([NotNull] SqlServerMigrationOperationSqlGenerator generator)
            {
                Check.NotNull(generator, "generator");

                _generator = generator;
            }