public List <MajorModel> GetAllMajor()
 {
     try
     {
         return(majorRepository.GetAll());
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #2
0
        public List <ProjectByMajorEntryModel> CreateProjectsByMajor()
        {
            var list = new List <ProjectByMajorEntryModel>();

            var majors = _majorRepository.GetAll().ToList();

            foreach (var m in majors)
            {
                var totalProjectsByMajor = GetProjectsTotalByMajor(m);
                list.Add(new ProjectByMajorEntryModel
                {
                    Carrera   = m.Name,
                    Proyectos = totalProjectsByMajor
                });
            }

            return(list);
        }
Example #3
0
 public IEnumerable <Major> GetAll()
 {
     return(_majorRepository.GetAll());
 }
Example #4
0
 public IList <Major> GetAll()
 {
     return(majorRepository.GetAll());
 }
Example #5
0
 public IQueryable <Major> All()
 {
     return(_majorRepository.GetAll());
 }