Esempio n. 1
0
        public List <PlanetTypes> GetPlanetTypes()
        {
            var planetTypesRepo = new PlanetTypesRepository(_connection);
            var planetTypes     = planetTypesRepo.GetAll();

            return(planetTypes);
        }
Esempio n. 2
0
        //get a string of types
        public List <string> GetPlanetTypeNames()
        {
            var planetTypesRepo = new PlanetTypesRepository(_connection);
            var planetTypes     = planetTypesRepo.GetAll();

            var planetTypesNames = new List <string>();

            foreach (var pt in planetTypes)
            {
                planetTypesNames.Add(pt.Type);
            }
            return(planetTypesNames);
        }