コード例 #1
0
        public CollectionFactory(Application app, ISquadRepository squadRepository)
        {
            _app = app;

            NationViewModels = squadRepository.GetNations().Select(n => new ComboBoxItemViewModel(n.Id, n.Name)).ToList();
            CityViewModels   = squadRepository.GetCities().Select(n => new ComboBoxItemViewModel(n.Id, n.Name)).ToList();
            SportViewModels  = squadRepository.GetSports().Select(n => new ComboBoxItemViewModel(n.Id, n.Name)).ToList();

            PositionRoles = Enum.GetValues(typeof(PositionRole)).Cast <PositionRole>().ToList(); //.Select(pr => new ComboBoxItemViewModel((int)pr, pr.ToString())).ToList();
        }