public async Task UpdateCliente(ClienteForUpdateModel model, string id) { if (model == null) { throw new System.Exception("Erro"); } var cliente = _mapper.Map <CLIENTE>(model); var res = await _repository.UpdateCLIENTE(id, cliente, model.CurrentPassword, model.NewPassword); if (res.Succeeded) { return; } throw new Exception("Erro"); }
public async Task <IActionResult> EditCliente(ClienteForUpdateModel model, string id) { await _service.UpdateCliente(model, id); return(NoContent()); }