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()); } }
public IEnumerable <Profession> GetAll() { return(_professionRepository.GetAll()); }
/// <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()); }
public IEnumerable <Profession> GetAll() { var entities = repository.GetAll().Where(x => x.IsActive).OrderBy(x => x.ProfessionName); return(entities); }