public async Task <ResultServiceVM> Delete(Guid id) { ResultServiceVM resultServiceVM = new ResultServiceVM(); await _clientService.Remove(new RemoveClientCommand(id)); resultServiceVM.Messages.AddRange(_notifications.GetNotificationsMessages()); return(resultServiceVM); }
public async Task <ResultServiceVM> Post(ClientInsertInVM clientInsertInVM) { ResultServiceVM resultServiceVM = new ResultServiceVM(); await _clientService.Register(Mapper.Map <RegisterClientCommand>(clientInsertInVM)); resultServiceVM.Messages.AddRange(_notifications.GetNotificationsMessages()); return(resultServiceVM); }
public async Task <ResultServiceVM> Put(Guid id, ClientUpdateInVM clientUpdateInVM) { ResultServiceVM resultServiceVM = new ResultServiceVM(); UpdateClientCommand updateClientCommand = Mapper.Map <UpdateClientCommand>(clientUpdateInVM); updateClientCommand.Id = id; await _clientService.Update(updateClientCommand); resultServiceVM.Messages.AddRange(_notifications.GetNotificationsMessages()); return(resultServiceVM); }