private void AddStep() { var vm = new AddStepViewModel(Recipe); var win = new AddStepWindow() { DataContext = vm }; if (win.ShowDialog() ?? false) { Recipe.Steps.Add(vm.Step); } }
private void AddStep() { var vm = new AddStepViewModel(SelectedRecipe); var win = new AddStepWindow() { DataContext = vm }; if (win.ShowDialog() ?? false) { SelectedRecipe.Steps.Add(vm.Step); SqliteDBManager.Instance.SaveDBChanges(); } }