public void Handle(ICommandContext context, ChangeSectionCommand command) { context.Get <Section>(command.AggregateRootId).ChangeSection(command.Name, command.Description); }
public async Task HandleAsync(ICommandContext context, ChangeSectionCommand command) { var section = await context.GetAsync <Section>(command.AggregateRootId); section.ChangeSection(command.Name, command.Description); }