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()); }
public async Task <ActionResult> Update([FromBody] Requests.Cliente cliente) { return(Ok(await clienteAppService.Update(cliente, cliente.Id))); }
public async Task <ActionResult> Add([FromBody] Requests.Cliente cliente) { return(Ok(await clienteAppService.Add(cliente))); }