public virtual void Init(Repository repository, CollegesRepository collegesRepository) { CollegeSelectListItems = new SelectList( collegesRepository.GetList() , "Id" , "CollegeName" ); }
public ICollection <College> GetColleges() { try { return(CollegesRepository.GetList()); } catch (Exception) { return(new List <College>()); } }
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>()); } }
public CollegesService() { connectionFactory = ConnectionHelper.GetConnection(); context = new DbContext(connectionFactory); collegesRepository = new CollegesRepository(context); }
public CollegesController() { _collegesRepository = new CollegesRepository(Context); }
public ProspectsController() { _prospectsRepository = new ProspectsRepository(Context); _collegesRepository = new CollegesRepository(Context); }