private async Task FillPlacesAsync() { using (new ShowLoading()) { var places = await _placeService.GetAllAsync(); placeDtoBindingSource.DataSource = places; } }
public async Task <IEnumerable <PreviewPlaceResource> > GetAllAsync() { var places = await _PlaceService.GetAllAsync(); var result = _Mapper.Map <IEnumerable <Place>, IEnumerable <PreviewPlaceResource> >(places).ToList(); result.ToList().ForEach(p => p.Thumbnail = Request.Host.ToString() + "/" + p.Thumbnail); return(result); }
public async Task <IActionResult> GetAll() { var places = await _placeService.GetAllAsync(); return(Ok(places)); }