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