public ActionResult Create(Consignee consignee) { if (ModelState.IsValid) { db.Consignees.Add(consignee); db.SaveChanges(); return RedirectToAction("Index"); } return View(consignee); }
public ActionResult Edit(Consignee consignee) { if (ModelState.IsValid) { db.Entry(consignee).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(consignee); }