Exemplo n.º 1
0
 public RedirectToActionResult People(string firstName, string lastName, string birthDate, string deathDate)
 {
     people           = new ImportantPeople();
     people.FirstName = firstName;
     people.LastName  = lastName;
     people.BirthDate = birthDate;
     people.DeathDate = deathDate;
     PeopleRepository.AddPeople(people);
     return(RedirectToAction("People"));
 }
Exemplo n.º 2
0
        static void TestData()
        {
            ImportantPeople person1 = new ImportantPeople()
            {
                BirthDate = "02/24/1938",
                DeathDate = "Current",
                FirstName = "Phillup",
                LastName  = "Knight"
            };

            People.Add(person1);

            ImportantPeople person2 = new ImportantPeople()
            {
                BirthDate = "09/13/1809",
                DeathDate = "12/15/1864",
                FirstName = "Eugene",
                LastName  = "Skinner"
            };

            People.Add(person2);

            ImportantPeople person3 = new ImportantPeople()
            {
                BirthDate = "01/25/1951",
                DeathDate = "05/30/1975",
                FirstName = "Steve",
                LastName  = "Prefontaine"
            };

            People.Add(person3);

            ImportantPeople person4 = new ImportantPeople()
            {
                BirthDate = "06/08/1965",
                DeathDate = "Current",
                FirstName = "Stanley",
                LastName  = "Love"
            };

            People.Add(person4);
        }
Exemplo n.º 3
0
 public static void AddPeople(ImportantPeople people)
 {
     People.Add(people);
 }