public void TestDeleteDept() { var deptName = "TecBridge"; var dept = _deptManager.GetDeptByNameBAL(deptName); _deptManager.DeleteDeptBAL(dept); var deptX = _deptManager.GetDeptByNameBAL(deptName); Assert.Null(deptX); }
public ActionResult DeleteDepartment(int id) { var dept = _deptManager.GetDeptByIdBAL(id); if (dept == null) { return(NotFound()); } _deptManager.DeleteDeptBAL(dept); return(Ok(dept)); }