Esempio n. 1
0
 public async Task <IActionResult> Add([FromBody] PessoaJuridicaAddModel model)
 {
     try
     {
         return(new OkObjectResult(await _pessoaJuridicaService.Add(model)));
     }
     catch (Exception ex)
     {
         return(new OkObjectResult(
                    new ResponsePessoaJuridicaAddModel {
             PessoaJuridica = null, Message = ex.Message, Success = false
         }
                    ));
     }
 }