示例#1
0
        public async Task <IActionResult> SearchPlaces(string search = null)
        {
            IEnumerable <PlaceListGetModel> places = default;

            if (!string.IsNullOrEmpty(search))
            {
                places = await placeService.SearchPlacesAsync(search);
            }

            places = await placeService.AllAysnc();

            return(Ok(places));
        }
示例#2
0
        public async Task <IActionResult> SearchPlaces(string search = null)
        {
            if (!string.IsNullOrEmpty(search))
            {
                var foundPlaces = await placeService.SearchPlacesAsync(search);

                return(View("List", foundPlaces));
            }

            var places = await placeService.AllAysnc();

            return(View("List", places));
        }