public void Handle(ICommandContext context, UpdateConference command) { context.Get <Conference>(command.AggregateRootId).Update(new ConferenceEditableInfo( command.Name, command.Description, command.Location, command.Tagline, command.TwitterSearch, command.StartDate, command.EndDate)); }
public async Task HandleAsync(ICommandContext context, UpdateConference command) { var conference = await context.GetAsync <Conference>(command.AggregateRootId); conference.Update(new ConferenceEditableInfo( command.Name, command.Description, command.Location, command.Tagline, command.TwitterSearch, command.StartDate, command.EndDate)); }
public static UpdateConference ToUpdateConferenceCommand(this EditableConferenceInfo model, ConferenceInfo original) { var command = new UpdateConference(); command.AggregateRootId = original.Id; command.Name = model.Name; command.Description = model.Description; command.Location = model.Location; command.Tagline = model.Tagline; command.TwitterSearch = model.TwitterSearch; command.StartDate = model.StartDate; command.EndDate = model.EndDate; return command; }
public static UpdateConference ToUpdateConferenceCommand(this EditableConferenceInfo model, ConferenceInfo original) { var command = new UpdateConference(); command.AggregateRootId = original.Id; command.Name = model.Name; command.Description = model.Description; command.Location = model.Location; command.Tagline = model.Tagline; command.TwitterSearch = model.TwitterSearch; command.StartDate = model.StartDate; command.EndDate = model.EndDate; return(command); }