public IActionResult Create(Models.Employee employee) { if (employee != null) { _emprepo.AddEmployee(employee); } return(RedirectToAction("Index", "Employee")); }
public IActionResult AddEmployee(EmpDetails emp) { try { _repo.AddEmployee(emp); return(Ok()); } catch (Exception e) { return(Ok(e.InnerException.Message)); } }
public void AddEmployee(EmployeeViewModel emp) { _empRespository.AddEmployee(emp); }