public Task <RequestStatus> Send(CommandBase commandBase) { var correlationId = new CorrelationId(Guid.NewGuid().ToString()); var requestStatus = new RequestStatus(correlationId, Status.PENDING); commandBase.CommandContext = new CommandContext() { CorrelationId = correlationId }; _commandStatusStorage.SaveStatus(requestStatus, commandBase); _eventBusService.SendQueuedCommand(commandBase); return(Task.FromResult(requestStatus)); }
public Task <RequestStatus> Send(CommandBase commandBase) { var correlationId = new CorrelationId(Guid.NewGuid().ToString()); var requestStatus = new RequestStatus(correlationId, Status.PENDING); var signedInUser = _userIdentityService.GetSignedInUserIdentity(); commandBase.CommandContext = new CommandContext() { CorrelationId = correlationId, User = signedInUser }; _eventBusService.SendQueuedCommand(commandBase); return(Task.FromResult(requestStatus)); }