示例#1
0
        public async Task <Response.Cliente> Add(Request.Cliente entity)
        {
            if (!IsParameterValid(entity))
            {
                throw new InvalidParametersException <IClienteAppService>();
            }

            var cliente = await clienteRepository.Add(entity.ConvertToData());

            await Salvar();

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