public IQueryable <District> GetDistricts(int cityId)
        {
            var rez = _districtsRepository.GetAll()
                      .Where(p => p.CitiesId == cityId)
                      .OrderBy(c => c.Name);


            return(rez);
        }
Exemple #2
0
 public DistrictsDto[] GetAll()
 {
     return(DistrictsRepository.GetAll().Select(x => new DistrictsDto
     {
         DistrictId = x.DistrictId,
         Name = x.Name
     }).ToArray());
 }