Esempio n. 1
0
        public async Task <ActionResult <IEnumerable <AddressReadDto> > > Search(string City)
        {
            try
            {
                var result = await _addrRepo.SearchAddr(City);

                if (result.Any())
                {
                    return(Ok(result));
                }
                return(NotFound());
            }
            catch (Exception)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, "Error"));
            }
        }