Пример #1
0
        public void TestUpdtedDept()
        {
            var dept = _deptManager.GetDeptByIdBAL(20004);

            dept.DepartmentName = "Yemo";
            _deptManager.PutDeptBAL(dept);

            dept.DepartmentName = "DILX";
            _deptManager.PutDeptBAL(dept);

            Assert.Equal("DILX", dept.DepartmentName);
        }
Пример #2
0
 public ActionResult PutDepartment(DepartmentViewModel dept)
 {
     if (ModelState.IsValid)
     {
         try
         {
             _deptManager.PutDeptBAL(dept);
         }
         catch (Exception)
         {
             throw;
         }
         return(Ok(dept));
     }
     else
     {
         return(BadRequest(ModelState));
     }
 }