Exemplo n.º 1
0
        public void Execute(ICommandContext context, SampleCommand command)
        {
            var root = context.GetAggregateRoot(command.AggregateId, () => SampleAggregateRoot.Register(command));

            root.Create(command);
        }
Exemplo n.º 2
0
        public static SampleAggregateRoot Register(SampleCommand command)
        {
            var root = new SampleAggregateRoot(command.AggregateId);

            return(root);
        }