public NinjaVisualViewModel(Entities database) { _database = database; _ninja = MainViewModel.CurrentNinja; Loadouts = _database.Loadouts.Where(e => e.Ninja == _ninja.Id).ToList(); SelectedLoadout = Loadouts.First(); _noItem = new Data.Equipment(); _noItem.Name = "No Item Found"; }
public EquipmentCreateViewModel(EquipmentListViewModel viewModel, Entities database) { _database = database; _viewModel = viewModel; Equipment = new Data.Equipment(); EquipmentTypes = database.Categories.ToList(); SaveCommand = new RelayCommand(Save); CancelCommand = new RelayCommand(Cancel); SelectImageCommand = new RelayCommand(SelectImage); Equipment.Name = "New Item"; Equipment.Category = EquipmentTypes.First(); Equipment.Value = 1; }