title: One to zero or one relationship in EF Core
body: <p>Let me simplify:</p>
  <p>Given two models</p>
  <p><code>Department</code> Model</p>
  <pre><code>    public Guid Id { get; set; }
      public string DepartmentID { get; set; }
      public string DepartmentName { get; set; }
      public Guid? DepartmentManager { get; set; } 
  </code></pre>
  <p><code>Employee</code> Model</p>
  <pre><code>    public Guid ID { get; set; }
      public string EmployeeID { get; set; }
      public string LastName { get; set; }
      public string FirstName { get; set; }
      public string MiddleName { get; set; }
  </code></pre>
  <p>I want to be able to assign one - and only one - Employee as DepartmentManager  for the Department.</p>
  <p>Example: Department is Finance. Department Manager is Joe, Blow.</p>
  <p>DepartmentManager in Department Model should contain the EmployeeID for Joe Blow from the Employee Model</p>
  <p>I think once I get the relationship correct in the models, I will be able to finish the cshtml pages to handle the CRUD correctly.</p>
  <p>Thanks,
  John</p>