Example #1
0
        public async Task <ActionResult <ViaCep> > GetByCep(int value, [FromServices] IViaCepService _viaCepService)
        {
            var viaCep = await _viaCepService.GetByCEPAsync(value);

            if (viaCep is null)
            {
                return(NotFound());
            }

            return(Ok(viaCep));
        }