public async Task Execute(ICommandExecutionContext context) { await context.GetEventService().Raise(new Published { AggregateId = this.PostId, PublicationDate = context.GetTimeService().Now(), }); }
public async Task Execute(ICommandExecutionContext context) { this.Result = await context.GetEventService().Raise(new TodoListCreatedEvent { AggregateId = context.GetIdGenerator().GenerateId(), Name = this.Name, Date = context.GetTimeService().Now(), }); }
public async Task Execute(RegisterUserCommand command, ICommandExecutionContext context) { await context.GetEventService().Raise(new Registered { AggregateId = command.Username, EmailAddress = command.EmailAddress, RegistrationDate = context.GetTimeService().Now(), }); }