protected override void Seed(ApplicationDbContext context) { ApplicationDbInitializer.InitializeIdentityForEf(context, _path); var dishes = ApplicationDbInitializer.GetDishesFromXml(context, _path); ApplicationDbInitializer.CreateWorkingDays(context); ApplicationDbInitializer.CreateMenuForWeek(context, dishes); _path = _path.Replace(@"DishDetails", "Employeers"); ApplicationDbInitializer.GetUsersFromXml(context, _path); ApplicationDbInitializer.CreateOrders(context); _path = _path.Replace(@"Employeers.xml", "storedfunc.sql"); Utility.CreateStoredFuncs(_path); }
public void TestMigration() { string _path = AppDomain.CurrentDomain.BaseDirectory.Replace(@"UnitTestProject1\bin\Debug", "") + @"ACSDining.Web\App_Data\DBinitial\DishDetails.xml"; ApplicationDbInitializer.InitializeIdentityForEf(dataContext, _path); ApplicationDbInitializer.CreateWorkingDays(dataContext); var dishes = ApplicationDbInitializer.GetDishesFromXml(dataContext, _path); ApplicationDbInitializer.CreateMenuForWeek(dataContext, dishes); _path = _path.Replace(@"DishDetails", "Employeers"); ApplicationDbInitializer.GetUsersFromXml(dataContext, _path); ApplicationDbInitializer.CreateOrders(dataContext); List <DishQuantity> dqualist = dataContext.DishQuantities.ToList(); Assert.IsTrue(dqualist.Count > 0); }