public ActionResult Create(EmployeeModel emp) { if (ModelState.IsValid) { if (emp == null) return View(emp); var employee = Mapper.Map<EmployeeModel, Employee>(emp); //_iRepository.Add(employee); //_iunitofwork.Employeerepository.Add(employee); _iemployeeservice.Add(employee); return RedirectToAction("Index"); } return View(emp); }
public ActionResult Create() { var model = new EmployeeModel(); return View(model); }