Esempio n. 1
0
        public void NewPatron()
        {
            var newPatron = context.Patrons.Create();

            newPatron.Id = Guid.NewGuid();
            context.Patrons.Add(newPatron);
            Patrons.Add(newPatron);
        }
Esempio n. 2
0
 public void BookSeats([Required, Range(1, 12)] int seatsRequested)
 {
     if ((Theater.TheaterCapacity - Patrons.Count) > seatsRequested)
     {
         for (int i = 0; i < seatsRequested; i++)
         {
             Patrons.Add(new Patron());
         }
     }
 }