public ICommandHandlerResult Execute(Commands.ICommandContext context, TestMyCommand command) { var root = context.GetAggregateRoot <Guid, TestAggregateRoot>(Guid.NewGuid(), () => new TestAggregateRoot()); Console.WriteLine("this command is test my command"); return(context.CreateResult(CommandHandlerStatus.Success)); }
public void TestTwoCommand() { var cmd1 = new TestCommand(); var cmd2 = new TestMyCommand(); var commandBus = ContainerContext.Current.ServiceLocator.Resolve <ICommandBus>(); commandBus.Send(cmd1, null); Console.ReadLine(); }