public IActionResult Post([FromBody] ContaCreateModel conta) { try { return(Created("Post", contaService.Create(mapper.Map <Conta>(conta)))); } catch (Exception ex) { logger.LogError(ex.Message); return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message)); } }
public async Task <IActionResult> Create([FromBody] Conta request) { return(await _contaService.Create(request)); }