// GET: Manager/Department public ActionResult DepartmentByID(int id) { DepartmentVM dvm = new DepartmentVM { Department = dRep.Find(id) }; return(View()); }
public void DepartmentTest() { var testDbContext = new TestDbContext(this._testDbSets); var departmentRepository = new DepartmentRepository(testDbContext); departmentRepository.Add(this._departments[0]); var result = departmentRepository.Find(d => d.Id == 1); var expectedResult = this._departments[0]; result.Should().ShouldBeEquivalentTo(expectedResult); }
public IList <Department> GetDepartments( string?name, DepartmentSortedType?sortedType, bool?descending, int?limit, int?offset) { return(departmentRepository.Find( name, sortedType ?? DepartmentSortedType.Id, descending ?? false, limit, offset )); }
// // GET: /Department/Details/5 public ActionResult Details(int?id) { return(View(IPD.Find(id))); }
public Department Find(Guid id) { return(DR.Find(id)); }