// GET: Manager/Department
        public ActionResult DepartmentByID(int id)
        {
            DepartmentVM dvm = new DepartmentVM
            {
                Department = dRep.Find(id)
            };

            return(View());
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 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)));
 }
Exemplo n.º 5
0
 public Department Find(Guid id)
 {
     return(DR.Find(id));
 }