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); }
public DummyAggregate(ResetDummyAggregateCommand command) { ApplyChange(new DummyCreatedEvent(command.Id, command.Name, command.Url)); }