Migration transformations provider for Microsoft SQL Server.
Наследование: TransformationProvider
        public void SetUp()
        {
            string constr = ConfigurationManager.AppSettings["SqlServer2005ConnectionString"];
            if (constr == null)
                throw new ArgumentNullException("SqlServer2005ConnectionString", "No config file");

            _provider = new SqlServerTransformationProvider(new SqlServer2005Dialect(), constr);
            _provider.BeginTransaction();

            AddDefaultTable();
        }
 public CliqFlipTransformationProvider(Dialect dialect, string connectionString)
 {
     try
     {
         string[] strings = connectionString.Split(new[] {"|^|"}, StringSplitOptions.RemoveEmptyEntries);
         _sqlServerTransformationProvider = new SqlServerTransformationProvider(dialect, strings[0]);
         _neo4JTransformationProvider = new Neo4jTransformationProvider(dialect, strings[1]);
     }
     catch (IndexOutOfRangeException e)
     {
         throw new Exception("The connection string needs data for sql and neo4j");
     }
 }
Пример #3
0
        private static void ResetDb()
        {
            var transformationProvider = new SqlServerTransformationProvider(new SqlServerDialect(), connectionString);

            var tables = transformationProvider.GetTables();

            foreach (var table in tables)
            {
                transformationProvider.RemoveTable(table);
            }


            MigrationsHelper.Run(connectionString);
        }