コード例 #1
0
        public ActionResult CreateUpdateView()
        {
            Employee employee = new Employee();

            UpdateModel(employee);
            repositary.Add(employee);
            TempData["Message"] = "Employee is added successfully";
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Create(Employee employee)
 {
     repositary.Add(employee);
     Response.Write("Registered Successfully");
     return(View());
 }