Ejemplo n.º 1
0
        public HttpResponseMessage swiper()
        {
            var _ctx = new foreignShopEntities();

            var newIndex = new Index
            {
                SwiperProductId   = 1,
                SwiperProductName = "我超级爱春梅",
                SwiperLinker      = "https://huyaimg.msstatic.com/cdnimage/gamebanner/phpCRjeHH1528708655.jpg"
            };

            _ctx.Index.Add(newIndex);
            _ctx.SaveChanges();
            return(ResultToJson.toJson(newIndex));
        }
Ejemplo n.º 2
0
 protected override void Initialize(HttpControllerContext controllerContext)
 {
     _ctx = new foreignShopEntities();
     base.Initialize(controllerContext);
 }