예제 #1
0
 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));
     }
 }
예제 #2
0
 public async Task <IActionResult> Create([FromBody] Conta request)
 {
     return(await _contaService.Create(request));
 }