public void GetAllShouldReturnEntities() { List <Speciality> result = repository.GetAll(null); Assert.AreNotEqual(0, result, "GetAll ничего не вернул"); }
public List <Speciality> GetAllSpecialities() { using (Db.BeginReadOnlyWork()) { return(_specialityRepository.GetAll(s => s.Faculty)); } }
public IEnumerable <SelectListItem> GetComboSpecialities() { var list = _specialityRepository.GetAll().Select(s => new SelectListItem { Text = s.Name, Value = s.Id.ToString() }).OrderBy(l => l.Text).ToList(); list.Insert(0, new SelectListItem { Text = "(Select a Speciality...)", Value = "0" }); return(list); }
public IHttpActionResult Get([FromUri] SpecialityFilter filter) { try { List <SpecialityModel> list = _repository.GetAll(filter).Select(MapEntityToModel).ToList(); var content = new EntitiesListResult <SpecialityModel> { Data = list, Page = -1, PageSize = -1 }; ; content.Total = list.Count; return(Ok(content)); } catch (Exception e) { return(HandleException(e)); } }
public List <Speciality> GetAll() { return(_repository.GetAll()); }
public IEnumerable <Speciality> GetAll() { return(_specialityRepository.GetAll()); }
public async Task <IEnumerable <Specialty> > GetAll() { return(await _specialtyRepository.GetAll()); }
public IQueryable <Speciality> GetSpecialitys() { return(_repository.GetAll()); }