示例#1
0
        public void TestDeleteDept()
        {
            var deptName = "TecBridge";
            var dept     = _deptManager.GetDeptByNameBAL(deptName);

            _deptManager.DeleteDeptBAL(dept);

            var deptX = _deptManager.GetDeptByNameBAL(deptName);

            Assert.Null(deptX);
        }
示例#2
0
        public ActionResult DeleteDepartment(int id)
        {
            var dept = _deptManager.GetDeptByIdBAL(id);

            if (dept == null)
            {
                return(NotFound());
            }
            _deptManager.DeleteDeptBAL(dept);
            return(Ok(dept));
        }