コード例 #1
0
        public async Task <ResultServiceVM> Delete(Guid id)
        {
            ResultServiceVM resultServiceVM = new ResultServiceVM();

            await _clientService.Remove(new RemoveClientCommand(id));

            resultServiceVM.Messages.AddRange(_notifications.GetNotificationsMessages());

            return(resultServiceVM);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }