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));
 }
示例#2
0
        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));
        }
示例#3
0
 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;
 }
示例#4
0
        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);
        }