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