Exemplo n.º 1
0
 public IActionResult Search(string street, string city, string county, string state, string country, string postalcode, string format = "json")
 {
     try
     {
         CepContext context = HttpContext.RequestServices.GetService(typeof(LCCUERJMapas.Models.CepContext)) as CepContext;
         List <ResultadoBuscaEndereco> objRetorno = _boBuscar.ObterInformacaoLocalizacao(context, street, city, county, state, country, postalcode, format);
         return(StatusCode(200, Newtonsoft.Json.JsonConvert.SerializeObject(objRetorno)));
     }
     catch (Exception ex)
     {
         return(StatusCode(500, ex.Message));
     }
 }
Exemplo n.º 2
0
 public CepRepository(CepContext context)
 {
     _context = context;
 }