Exemplo n.º 1
0
 public Configuration()
 {
     AutomaticMigrationsEnabled = false;
     MigrationsDirectory        = @"Migrations\ApplicationDbContext";
     SetSqlGenerator("MySql.Data.MySqlLient", new MySql.Data.Entity.MySqlMigrationSqlGenerator());
     CodeGenerator = new MySql.Data.Entity.MySqlMigrationCodeGenerator();
 }
Exemplo n.º 2
0
 public Configuration()
 {
     AutomaticMigrationsEnabled = false;
     SetSqlGenerator("MySql.Data.MySqlClient",
                     new MySql.Data.Entity.MySqlMigrationSqlGenerator());
     CodeGenerator = new MySql.Data.Entity.MySqlMigrationCodeGenerator();
 }
Exemplo n.º 3
0
 public Configuration()
 {
     AutomaticMigrationsEnabled = true;
     MigrationsDirectory        = @"Migrations\ForumDbContext";
     SetSqlGenerator("MySql.Data.MySqlLient", new MySql.Data.Entity.MySqlMigrationSqlGenerator());
     CodeGenerator = new MySql.Data.Entity.MySqlMigrationCodeGenerator();
     SetHistoryContextFactory("MySql.Data.MySqlClient", (conn, schema) => new MySqlHistoryContext(conn, schema));
 }
Exemplo n.º 4
0
        public Configuration()
        {
            AutomaticMigrationsEnabled = false;
            SetSqlGenerator("MySql.Data.MySqlClient", new MySql.Data.Entity.MySqlMigrationSqlGenerator());
            SetHistoryContextFactory("MySql.Data.MySqlClient", (conn, schema) => new MySqlHistoryContext(conn, schema)); //here s the

            CodeGenerator = new MySql.Data.Entity.MySqlMigrationCodeGenerator();
        }
Exemplo n.º 5
0
        public Configuration()
        {
            AutomaticMigrationsEnabled        = true;
            AutomaticMigrationDataLossAllowed = true;//todo 如果为false 建立数据库就会失败需要考虑分析下原因

            SetSqlGenerator("MySql.Data.MySqlClient", new MySql.Data.Entity.MySqlMigrationSqlGenerator());
            CodeGenerator = new MySql.Data.Entity.MySqlMigrationCodeGenerator();
        }
Exemplo n.º 6
0
        public Configuration()
        {
            AutomaticMigrationsEnabled = false;
            // fails with cannot assign MySqlMigrationSqlGenerator toSystem.Data.Entity.Migrations.Sql.MigrationSqlGenerator
            SetSqlGenerator("MySql.Data.MySqlClient", new MySql.Data.Entity.MySqlMigrationSqlGenerator());

            // fails with cannot assign MySqlMigrationCodeGenerator to System.Data.Entity.Migrations.Design.MigrationCodeGenerator
            CodeGenerator = new MySql.Data.Entity.MySqlMigrationCodeGenerator();
        }
Exemplo n.º 7
0
        public Configuration()
        {
            TargetDatabase = new System.Data.Entity.Infrastructure.DbConnectionInfo(ConnectionString, "MySql.Data.MySqlClient");

            AutomaticMigrationsEnabled        = true;
            AutomaticMigrationDataLossAllowed = false;

            SetSqlGenerator("MySql.Data.MySqlClient", new MySql.Data.Entity.MySqlMigrationSqlGenerator());
            CodeGenerator = new MySql.Data.Entity.MySqlMigrationCodeGenerator();
        }
Exemplo n.º 8
0
        public Configuration()
        {
            AutomaticMigrationsEnabled = true;
            SetSqlGenerator("MySql.Data.MySqlClient", new MySql.Data.Entity.MySqlMigrationSqlGenerator());
            CodeGenerator = new MySql.Data.Entity.MySqlMigrationCodeGenerator(); //this line was missing, so now the migrations does not contains the prefix "dbo"

            //AutomaticMigrationsEnabled = false;
            // SetSqlGenerator("MySql.Data.MySqlClient", new MySql.Data.Entity.MySqlMigrationSqlGenerator());

            //SetHistoryContextFactory("MySql.Data.MySqlClient", (conn, schema) => new MySqlHistoryContext(conn, schema));
        }
Exemplo n.º 9
0
 public Configuration()
 {
     AutomaticMigrationsEnabled = true;
     SetSqlGenerator("MySql.Data.MySqlClient", new MySql.Data.Entity.MySqlMigrationSqlGenerator());
     CodeGenerator = new MySql.Data.Entity.MySqlMigrationCodeGenerator(); //this line was missing, so now the migrations does not contains the prefix "dbo"
 }