public CustomerViewModel(ICustomerDataService customerDataService) { _customerDataService = customerDataService; CreateCustomer = ReactiveCommand.CreateFromTask(ExecuteCreateCreateCustomer); CreateCustomer.Subscribe(x => AddCustomer(x)); var canPrint = this .WhenAnyValue(x => x.SelectedCustomer) .Select(x => x != null); PrintCommand = ReactiveCommand.Create <Customer>(ExecutePrintCommand, canPrint); Task.Run(Initialize); }