Example #1
0
        public async Task <Response.Pedido> Add(Request.Pedido entity)
        {
            if (!IsParameterValid(entity))
            {
                throw new InvalidParametersException <IPedidoAppService>();
            }

            var pedido = await pedidoRepository.Add(entity.ConvertToData());

            await Salvar();

            return(new Response.Pedido());
        }
Example #2
0
 public async Task <ActionResult> Update([FromBody] Requests.Pedido cliente)
 {
     return(Ok(await clienteAppService.Update(cliente, cliente.Id)));
 }
Example #3
0
 public async Task <ActionResult> Add([FromBody] Requests.Pedido cliente)
 {
     return(Ok(await clienteAppService.Add(cliente)));
 }