public IEnumerable <DLModel.Profession> GetAllProfessionWeb(int OrganizationID)
 {
     if (_organizationRepository.GetById(OrganizationID).IsOrganizationAdmin)
     {
         return(_professionRepository.GetAll().Select(college => new DLModel.Profession().InjectFrom(college)).Cast <DLModel.Profession>().OrderBy(pro => pro.ProfessionID).ToList());
     }
     else
     {
         return(_professionRepository.GetAllProfessionWeb(OrganizationID).Select(college => new DLModel.Profession().InjectFrom(college)).Cast <DLModel.Profession>().OrderBy(college => college.ProfessionID).ToList());
     }
 }
Example #2
0
 public IEnumerable <Profession> GetAll()
 {
     return(_professionRepository.GetAll());
 }
Example #3
0
 /// <summary>
 /// Method whose purpose is to return all
 /// profession records from the database.
 /// </summary>
 /// <returns>
 /// Returns all profession objects as a IList
 /// of ProfessionModel objects.
 /// </returns>
 public IList <ProfessionModel> GetAll()
 {
     return(_professionRepository.GetAll());
 }
Example #4
0
        public IEnumerable <Profession> GetAll()
        {
            var entities = repository.GetAll().Where(x => x.IsActive).OrderBy(x => x.ProfessionName);

            return(entities);
        }