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