public OperationResult Post(Communicate communicate) { var theUser = Context.User.Identity.Name; // store the communication for reporting var command = new SendCommunicationCommand(communicate, theUser); _handler.Handle(command); return new OperationResult.SeeOther { RedirectLocation = typeof(List<OutboundMessage>).CreateUri() }; }
public SendCommunicationCommand(Communicate communicate, string username) { Communicate = communicate; Username = username; }