title: c# class to force at least one relationship
body: <p>This should be a simple question.</p>
  
  <p>Let's say I have an airline and a flight.
  one airline can have multiple flights.
  Each flight should be tied to one airline.</p>
  
  <p>How do I create classes to mimic this behavior? What I came up with as follows:</p>
  
  <pre><code>    public class Airline
  {
      private string Name;
      private string Description;
      private List&lt;Flight&gt; Flights;
      public Airline(string Name, string Description)
      {
          this.Name = Name;
          this.Description = Description;
      }
      public void AddFlight(Flight Flight)
      {
          if (!this.Flights.Contains(Flight))
          {
              this.Flights.Add(Flight);
          }
      }
      public void RemoveFlight(Flight Flight)
      {
          this.Flights.Remove(Flight);
      }
  }
  
  public class Flight
  {
      private string No;
      private string Time;
      private Airline Airline;
  
      public Flight(Airline Airline, string No, string Time)
      {
          this.No = No;
          this.Time = Time;
          this.Airline = Airline;
      }
  }
  </code></pre>
  
  <p>Is there any better approach to do this task? What I don't like is that when I create a flight, I have to add an airline to it and then I have to call Airline.AddFlight in order to associate it with my airline. Also, I'm looking if there's anything else wrong with the code or anything that can be improved.</p>