static void MigrateDatabase() { var cloner = new DbCloner("zero-k_ef", "zero-k_test", "Data Source=omega.licho.eu,100;Initial Catalog=zero-k_test;Persist Security Info=True;User ID=zero-k;Password=zkdevpass1;MultipleActiveResultSets=true"); cloner.CloneAllTables(); }
static void MigrateDatabase() { GlobalConst.Mode = ModeType.Test; var cloner = new DbCloner("zero-k", "zero-k_test", GlobalConst.ZkDataContextConnectionString); cloner.LogEvent += s => { Console.WriteLine(s); }; cloner.CloneAllTables(); }
public ActionResult ResetDb() { if (GlobalConst.Mode == ModeType.Test) { var cloner = new DbCloner("zero-k", "zero-k_test", GlobalConst.ZkDataContextConnectionString); cloner.LogEvent += s => { Response.Write(s); Response.Flush(); }; cloner.CloneAllTables(); Response.Write("DONE! Database copied"); Response.Flush(); return Content(""); } else return Content("Not allowed!"); }
public ActionResult ResetDb() { if (GlobalConst.Mode == ModeType.Test) { var cloner = new DbCloner("zero-k", "zero-k_test", GlobalConst.ZkDataContextConnectionString); cloner.LogEvent += s => { Response.Write(s); Response.Flush(); }; cloner.CloneAllTables(); Response.Write("DONE! Database copied"); Response.Flush(); return(Content("")); } else { return(Content("Not allowed!")); } }