Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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));
        }