public ActionResult Edit([Bind(Include = "Id,CityName,ShippingFee")] CityShippingFee cityShippingFee) { if (ModelState.IsValid) { db.Entry(cityShippingFee).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(cityShippingFee)); }
public ActionResult Create([Bind(Include = "Id,CityName,ShippingFee")] CityShippingFee cityShippingFee) { if (ModelState.IsValid) { db.CityShippingFees.Add(cityShippingFee); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(cityShippingFee)); }
// GET: ADMIN/CityShippingFees/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CityShippingFee cityShippingFee = db.CityShippingFees.Find(id); if (cityShippingFee == null) { return(HttpNotFound()); } return(View(cityShippingFee)); }