예제 #1
0
        public async Task <List <LocationsDto> > GetAllCitiesAsync()
        {
            var locations = await _repository.FindByLevel(2);

            return(locations?.Select(l => new LocationsDto
            {
                Code = l.Code,
                ParentCode = l.ParentCode,
                Name = l.Name,
                MergeName = l.MergeName,
                Latitude = l.Latitude,
                Longitude = l.Longitude,
                Level = l.Level
            }).ToList());
        }