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

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

            return(root);
        }