public void TestGetDeptById() { var deptName = "Gateway Digital"; var dept = _deptManager.GetDeptByIdBAL(20019); Assert.Equal(deptName, dept.DepartmentName); }
public ActionResult GetDepartmentById(string DepartmentID) { var objDept = new DepartmentViewModel(); int Id = Convert.ToInt32(DepartmentID); try { objDept = _deptManager.GetDeptByIdBAL(Id); if (objDept == null) { return(NotFound()); } } catch (Exception) { throw; } return(Ok(objDept)); }