title: Code First: How to express many to many when one side can be 0 or many?
body: <p>A developer can be affected to 0 or more task. A task needs at least one developer to be executed. How do I express that in Code first?</p>
  
  <pre><code>public class Task
  {
     public int ID
     //more properties here
  
     public virtual ICollection&lt;Developer&gt; Developers { get; set; }
  }
  
  public class Developer
  {
     public int ID
     //more properties here
  
     public virtual ICollection&lt;Task&gt; Tasks { get; set; }
  }
  </code></pre>
  
  <p>Thanks for helping</p>