예제 #1
0
        public async Task <IActionResult> Delete(int id)
        {
            DeletePreservationRequest  request = new DeletePreservationRequest(id);
            DeletePreservationResponse result  = await _PreservationAppService.deletePreservation(request);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(NotFound(result));
        }
예제 #2
0
        public Task <DeletePreservationResponse> deletePreservation(DeletePreservationRequest request)
        {
            DeletePreservationCommand command      = new DeletePreservationCommand(request.Id);
            Task <object>             Preservation = (Task <object>)Bus.SendCommand(command);
            //RabbitMQBus.Publish(command);
            DeletePreservationResponse response = new DeletePreservationResponse();

            response = Common <DeletePreservationResponse> .checkHasNotification(_notifications, response);

            return(Task.FromResult(response));
        }