title: 0..1 to many relationship with Fluent API with EntityFramework Core
body: <p>I need to declare an 0..1 to many relationship using Fluent API with EntityFramework Core. Right now I have a 1 to many relationship and I cannot figure out how to change that to a 0..1 to many.</p>
  
  <pre><code>modelBuilder.Entity&lt;Item&gt;()
        .HasOne(c =&gt; c.Constraint)
        .WithMany(p =&gt; p.Constraint)
        .HasForeignKey(p =&gt; p.Growid)
        .HasPrincipalKey(b =&gt; b.Growid);
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>