public virtual void Init(Repository repository, CollegesRepository collegesRepository)
 {
     CollegeSelectListItems = new SelectList(
         collegesRepository.GetList()
         , "Id"
         , "CollegeName"
         );
 }
Exemplo n.º 2
0
 public ICollection <College> GetColleges()
 {
     try
     {
         return(CollegesRepository.GetList());
     }
     catch (Exception)
     {
         return(new List <College>());
     }
 }
Exemplo n.º 3
0
 public ICollection <Faculty> GetFacultiesInCollege(string collegeName)
 {
     try
     {
         var college = CollegesRepository.GetList().Where(x => x.Name == collegeName).First();
         return(FacultiesRepository.GetList(college));
     }
     catch (Exception)
     {
         return(new List <Faculty>());
     }
 }
Exemplo n.º 4
0
        public ActionResult Index()
        {
            var colleges = _collegesRepository.GetList();

            return(View(colleges));
        }