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