示例#1
0
        public Dictionary <string, int> GetFacultiesHours(int year)
        {
            Dictionary <string, int> facultiesHours = new Dictionary <string, int>();
            var faculties = _facultyRepository.GetAll().ToList();

            foreach (var faculty in faculties)
            {
                facultiesHours[faculty.Name] = _facultyRepository.GetFacultyHours(faculty.Id, year);
            }
            return(facultiesHours);
        }
示例#2
0
 public List <Faculty> GetAllFaculties()
 {
     using (Db.BeginReadOnlyWork())
     {
         return(_facultyRepository.GetAll());
     }
 }
 public List <Faculty> GetFaculties()
 {
     return(_facultyRepository
            .GetAll()
            .Include(f => f.UniversityFaculties)
            .OrderBy(f => f.Name)
            .ToList());
 }
        public List <FacultyDTO> GetAll()
        {
            List <FacultyDTO> retVal = null;
            List <FACULTY>    entries;

            try
            {
                entries = facultyRepository.GetAll();
                if (CheckHelper.IsFilled(entries))
                {
                    retVal = transformer.TransformToDTO(entries);
                }
            }
            catch (Exception) { }

            return(retVal);
        }
示例#5
0
 public async Task <IEnumerable <Faculty> > GetAllFaculties()
 {
     return(await _facultyRepository.GetAll());
 }
示例#6
0
 public IQueryable <Faculty> GetAll()
 {
     return(_facultyRepository.GetAll());
 }
示例#7
0
        // GET: Faculty
        public async Task <ActionResult> Index()
        {
            var Facultys = await _Faculty.GetAll();

            return(View(Facultys));
        }
示例#8
0
 public List <Faculty> GetFacultiesByUniversityId(short id)
 {
     return(_facultyRepository.GetAll().Where(f => f.UniversityFaculties.Any(uf => uf.UniversityId == id)).ToList());
 }