public NinjaCreateViewModel(NinjaListViewModel listViewModel, Entities database) { _loadout = new Ninja(); _loadoutName = "New Ninja"; _loadoutGold = 500; _listViewModel = listViewModel; _database = database; CancelCommand = new RelayCommand(Cancel); SaveCommand = new RelayCommand(Save); }
public NinjaEditViewModel(NinjaListViewModel listViewModel, Entities database) { _loadout = listViewModel.SelectedNinja; _loadoutName = _loadout.Name; _loadoutGold = _loadout.Gold; _listViewModel = listViewModel; _database = database; CancelCommand = new RelayCommand(Cancel); SaveCommand = new RelayCommand(Save); }