public ActionResult Create([Bind(Include = "Id,Name,Address,ContactNo,IsDeleted")] Party party) { if (ModelState.IsValid) { _partyManager.Add(party); return(RedirectToAction("Index")); } return(View(party)); }
public ActionResult Create([Bind(Include = "Id,Name,ContactNo,Address,IsDeleted")] Party party) { if (ModelState.IsValid) { _partyManager.Add(party); TempData["msg"] = "Party information has been successfully saved"; return(RedirectToAction("Index")); } TempData["msg"] = "Party information has been failed to save"; return(View(party)); }