public async Task CreateCliente(ClienteForCreationModel model) { if (model == null) { throw new Exception("Erro"); } var cliente = _mapper.Map <CLIENTE>(model); var res = await _repository.CreateCLIENTE(cliente, model.Password); if (res.Succeeded) { return; } throw new Exception("Erro"); }
public async Task <IActionResult> CreateCliente(ClienteForCreationModel model) { await _service.CreateCliente(model); return(Ok()); }