public IQueryable <District> GetDistricts(int cityId) { var rez = _districtsRepository.GetAll() .Where(p => p.CitiesId == cityId) .OrderBy(c => c.Name); return(rez); }
public DistrictsDto[] GetAll() { return(DistrictsRepository.GetAll().Select(x => new DistrictsDto { DistrictId = x.DistrictId, Name = x.Name }).ToArray()); }