Example #1
0
 public void AddVoyage(Voyage voyage)
 {
     if (voyage != null && !HasVoyage(voyage))
     {
         BookingCollection.Add(
             new Booking()
         {
             Passenger = this,
             Voyage    = voyage
         }
             );
     }
 }
Example #2
0
 void propose(Voyage v)
 {
     VoyageCollection.Add(v);
     v.Driver = this;
 }
Example #3
0
 public bool HasVoyage(Voyage voyage) =>
 BookingCollection.Any(
     r => r.Voyage != null &&
     r.Voyage.Id == voyage.Id);
Example #4
0
 public void reserve(Voyage v)
 {
 }