private void OnCalculatePaymentsCommandExecute() { var worker = new BackgroundWorker(); worker.DoWork += (i, j) => { var result = _appService.GetCalculatedPayments(Id, DownPayment, NumberOfPayments, FirstMonthlyPaymentDate); if (result != null) { DispatcherHelper.CheckBeginInvokeOnUI(() => { _paymentsCalculationViewModel.Show(result); }); } }; worker.RunWorkerAsync(); }