public ActionResult Edit(Food food) { BLLServiceGateway<IEnumerable<Category>> Categate = new BLLServiceGateway<IEnumerable<Category>>(); var cats = Categate.GetItems("api/Category/"); BLLServiceGateway<Food> gate = new BLLServiceGateway<Food>(); gate.PutItems("api/Food/" + food.Id, food); ViewBag.CategaryId = new SelectList(cats, "Id", "Name"); return RedirectToAction("Index"); }
public ActionResult Edit(HomePic hc) { BLLServiceGateway<HomePic> gate = new BLLServiceGateway<HomePic>(); gate.PutItems("api/HomePic/" + hc.Id, hc); return RedirectToAction("Index"); }