title: Entity Framework HasOptional In Data Annotations
body: <p>How do I make the object VirtualTerminal optional in the code below ?  Do I have to remove VirtualTerminal and only use VirtualTerminalId ?  </p>
  
  <pre><code>[Table("Computer")]
  public    class Computer :Device
  {
      //public int Id { get; set; }
      public string OperatingSystem { get; set; }
      public string OS_LicenseKey { get; set; }
      public VirtualTerminal VirtualTerminal { get; set; }
      public int? VirtualTerminalId { get; set; }       
  }
  </code></pre>