public async Task <ResponsePostCarrinho> ExecuteAsync(RequestCarrinho request) { CarrinhoEntity carrinho = new CarrinhoEntity(request.Nome); await carrinhoRepo.CriarCarrinho(carrinho); return(mapper.Map <ResponsePostCarrinho>(carrinho)); }
public async Task <IActionResult> Post([FromBody] RequestCarrinho value) { var response = await _criarCarrinhoUseCase.ExecuteAsync(value); return(Created("/carrinhos", response)); }