public void TestUpdtedEmp() { var emp = _employee.GetEmpByIdAtBL(20008); emp.Department = "AutoDAP"; _employee.PutEmpAtBL(emp); emp.Department = "Autofacets"; _employee.PutEmpAtBL(emp); Assert.AreEqual("Autofacets", emp.Department); }
public IHttpActionResult PutEmployee(EmployeeViewModel emp) { if (ModelState.IsValid) { try { _employee.PutEmpAtBL(emp); } catch (Exception) { throw; } return(Ok(emp)); } else { return(BadRequest(ModelState)); } }