title: Code first virtual property for relationship still builds with a non-nullable column
body: <p>My <code>Emails</code> object in my data model has a relationship to <code>EmailTemplates</code> but since an Email doesn't <em>NEED</em> to have an associated template, I want the relationship to allow null values so I've set up the property in <code>Email</code> as a virtual:</p>
  
  <pre><code>public class Email
  {
      public int Id { get; set; }
      public virtual EmailTemplate EmailTemplate { get; set; }
  }
  </code></pre>
  
  <p>This unfortunately has not set the EmailTemplateId column generated for the FK relationship as nullable so whenever I try to add an email that doesn't use a template, my insert statement violates the constraint.</p>
  
  <p><a href="https://i.stack.imgur.com/YkiNX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YkiNX.png" alt="EmailTemplateId column should accept null values"></a></p>
  
  <p>How can I modify my data model to allow nulls for this relationship?</p>