Exemplo n.º 1
0
        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);
        }
Exemplo n.º 3
0
        public async Task <IActionResult> GetAll()
        {
            var places = await _placeService.GetAllAsync();

            return(Ok(places));
        }