public void ProcessAction(UpdateDealCommand eventObject) { var deal = this.dealRepository.FindById(eventObject.DealId); Mapper.CreateMap<UpdateDealCommand, Deal>(); Mapper.Map(eventObject, deal); this.dealRepository.Save(deal); this.eventBroker.Publish(new DealUpdatedEvent(deal.Id), Topics.EVENTS); }
public void ProcessAction(SaveAction eventObject) { var viewModel = this.dealView.GetDealViewModel(); if (viewModel != null) { var command = new UpdateDealCommand( viewModel.Id, viewModel.Name, viewModel.Comment, viewModel.Reference, viewModel.StartDate, viewModel.EndDate); this.OnUpdateDealCommand(command); } }