public BandListViewModel(IMediator mediator, IBandFacade bandFacade) { _mediator = mediator; _bandFacade = bandFacade; BandNew = new RelayCommand(BandNewExecute); BandSelected = new RelayCommand <BandListModel>(BandSelectedExecute); mediator.Register <UpdateMessage <BandDetailModel> >(BandUpdateOrDeleteExecute); mediator.Register <DeleteMessage <BandDetailModel> >(BandUpdateOrDeleteExecute); Bands.AddRange(_bandFacade.GetAll()); }
public EventDetailViewModel( IEventFacade eventFacade, IMediator mediator, IBandFacade bandFacade, IStageFacade stageFacade, IMessageDialogService messageDialogService) { _eventFacade = eventFacade; _mediator = mediator; _bandFacade = bandFacade; _stageFacade = stageFacade; _messageDialogService = messageDialogService; UpdateCommand = new RelayCommand(UpdateEventExecute, CanUpdateEvent); DeleteCommand = new RelayCommand(DeleteEventExecute, CanDeleteBand); Bands.AddRange(_bandFacade.GetAll()); Stages.AddRange(_stageFacade.GetAll()); }