public virtual void Init(Repository repository, CollegesRepository collegesRepository)
 {
     CollegeSelectListItems = new SelectList(
         collegesRepository.GetList()
         , "Id"
         , "CollegeName"
         );
 }
示例#2
0
 public ICollection <College> GetColleges()
 {
     try
     {
         return(CollegesRepository.GetList());
     }
     catch (Exception)
     {
         return(new List <College>());
     }
 }
示例#3
0
文件: NoteModel.cs 项目: Isur/a-d-d
 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>());
     }
 }
示例#4
0
        public ActionResult Index()
        {
            var colleges = _collegesRepository.GetList();

            return(View(colleges));
        }