예제 #1
0
 public PlanetController()
 {
     // This is temporary code, just for testing
     if (InfoRepository.SWSpecies.Count == 0) // only do this if it hasn't been done already
     {
         species = new Species()
         {
             SpeciesName    = "Wookiee",
             Classification = "mammal",
             Designation    = "sentient",
             AvgHeight      = 210,
             Language       = "Shyriiwook",
             AvgLifeSpan    = 400,
             Homeworld      = new Planet()
             {
                 PlanetName       = "Kashyyyk",
                 RotationalPeriod = 26,
                 OrbitalPeriod    = 381,
                 Diameter         = 12765,
                 Climate          = "tropical",
                 Gravity          = 1
             }
         };
         InfoRepository.AddSpecies(species);
     }
 }