public void TestDeleteEmp() { var empName = "Hemant.Mohapatra"; var emp = _empManager.GetEmpByNameBAL(empName); _empManager.DeleteEmpBAL(emp); var empX = _empManager.GetEmpByNameBAL(empName); Assert.Null(empX); }
public ActionResult DeleteEmployee(int id) { var emp = _empManager.GetEmpByIdBAL(id); if (emp == null) { return(NotFound()); } _empManager.DeleteEmpBAL(emp); return(Ok(emp)); }