Ejemplo n.º 1
0
 public RedirectToActionResult Locations(string locationName, string description, string dateEstablished)
 {
     location = new ImportantLocations();
     location.LocationName    = locationName;
     location.Description     = description;
     location.DateEstablished = dateEstablished;
     LocationsRepository.AddLocation(location);
     return(RedirectToAction("Locations"));
 }
        static void TestData()
        {
            ImportantLocations location1 = new ImportantLocations()
            {
                LocationName = "Spencer's Butte",
                Description  = "A butte located in South Eugene. Named after a young Englishmen who" +
                               " is thought to have been killed from the Kalapuya while hiking the Butte alone",
                DateEstablished = "20 - 30 million years old"
            };

            Locations.Add(location1);

            ImportantLocations location2 = new ImportantLocations()
            {
                LocationName    = "University of Oregon",
                Description     = "College University located in the campus area of Eugene",
                DateEstablished = "1876"
            };

            Locations.Add(location2);

            ImportantLocations location3 = new ImportantLocations()
            {
                LocationName    = "Autzen Stadium",
                Description     = "Football arena located in East Eugene",
                DateEstablished = "September 23, 1967"
            };

            Locations.Add(location3);

            ImportantLocations location4 = new ImportantLocations()
            {
                LocationName    = "The Hult Center for the Performing Arts",
                Description     = "A concert venue located in Downtown Eugene",
                DateEstablished = "1982"
            };

            Locations.Add(location4);
        }
 public static void AddLocation(ImportantLocations location)
 {
     Locations.Add(location);
 }