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

            return(View());
        }
Exemple #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);
        }
Exemple #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)));
 }
Exemple #5
0
 public Department Find(Guid id)
 {
     return(DR.Find(id));
 }