Ejemplo n.º 1
0
        private async Task <DummyAggregate> CreateDummyAggregate(IEventRepository <DummyAggregate> repository)
        {
            var resetCommand = new ResetDummyAggregateCommand()
            {
                Id   = Guid.NewGuid(),
                Name = "The name",
                Url  = "https://url.example.com"
            };

            var aggregate = new DummyAggregate(resetCommand);
            await repository.SaveAsync(aggregate);

            return(aggregate);
        }
Ejemplo n.º 2
0
 public DummyAggregate(ResetDummyAggregateCommand command)
 {
     ApplyChange(new DummyCreatedEvent(command.Id, command.Name, command.Url));
 }