public IHttpActionResult DeleteEmployee(int id) { var emp = _employee.GetEmpByIdAtBL(id); if (emp == null) { return(NotFound()); } _employee.DeleteEmpAtBL(emp); return(Ok(emp)); }
public void TestDeleteEmp() { var empName = "Hemant.Mohapatra"; var emp = _employee.GetEmpByNameBL(empName); _employee.DeleteEmpAtBL(emp); var empX = _employee.GetEmpByNameBL(empName); Assert.IsNull(empX); }