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