public void TestGetEmpById() { var empName = "Abhijeet Trivedi"; var emp = _empManager.GetEmpByIdBAL(20008); Assert.Equal(empName, emp.EmployeeName); }
public ActionResult GetEmployeeById(string employeeId) { var objEmp = new EmployeeViewModel(); int Id = Convert.ToInt32(employeeId); try { objEmp = _empManager.GetEmpByIdBAL(Id); if (objEmp == null) { return(NotFound()); } } catch (Exception) { throw; } return(Ok(objEmp)); }