public DishOrderTest() { controller = new DishOrderController(); var optionsBuilder = new DbContextOptionsBuilder <SqlContext>(); optionsBuilder.UseSqlServer("Server=localhost;Database=OAPDatabaseTestDishOrder;Trusted_Connection=True;MultipleActiveResultSets=true"); var context = new SqlContext(optionsBuilder.Options); context.Database.Migrate(); OAPoliselo.Infra.Data.DbInitializer.Initialize(context); }
public ActionResult GetThemeLocat(string id) { string key = HCRequest.GetString("key"); string weixinid = ""; if (!key.Equals("") && key.Contains("@")) { weixinid = key.Split('@')[0];//酒店微信id } DataTable dt = TravelThemeLogic.GetThemeLocat(weixinid); return(Json(new { data = DishOrderController.SerializeDataTable(dt) }, JsonRequestBehavior.AllowGet)); }