public ActionResult CreateUpdateView() { Employee employee = new Employee(); UpdateModel(employee); repositary.Add(employee); TempData["Message"] = "Employee is added successfully"; return(RedirectToAction("Index")); }
public ActionResult Create(Employee employee) { repositary.Add(employee); Response.Write("Registered Successfully"); return(View()); }