private static void CleanUp() { using (var ctx = new TicketDeskContext("TicketDesk")) { ctx.Database.Delete(); } using (var ctx = new EmptyDatabaseContext("TicketDesk2xRefernece")) { ctx.Database.Delete(); } }
private static void CleanUp() { using (var ctx = new TicketDeskContext("TicketDesk")) { ctx.Database.Delete(); } using (var ctx = new EmptyDatabaseContext("TicketDesk2xRefernece")) { ctx.Database.Delete(); } }
private void MakeLegacyDb() { var reader = System.IO.File.OpenText(@"..\..\SqlScripts\TicketDesk2DB\TicketDeskObjects.sql"); var sql = reader.ReadToEnd(); Database.SetInitializer <EmptyDatabaseContext>(new DropCreateDatabaseAlways <EmptyDatabaseContext>()); using (var ctx = new EmptyDatabaseContext("TicketDesk2xRefernece")) { ctx.Database.Initialize(true); ctx.Database.ExecuteSqlCommand(sql); } }
private void MakeLegacyDb() { var reader = System.IO.File.OpenText(@"..\..\SqlScripts\TicketDesk2DB\TicketDeskObjects.sql"); var sql = reader.ReadToEnd(); Database.SetInitializer<EmptyDatabaseContext>(new DropCreateDatabaseAlways<EmptyDatabaseContext>()); using (var ctx = new EmptyDatabaseContext("TicketDesk2xRefernece")) { ctx.Database.Initialize(true); ctx.Database.ExecuteSqlCommand(sql); } }