title: How can I set one directional relation between two tables in EF Code First
body: <p>For all classes in my Entity I have  a base class named CommonFields</p>
  
  <pre><code>public class CommonFields
  {
      public int Status { get; set; }
      public DateTime CreatedOn { get; set; }
      public int CreaedBy { get; set; }
      public DateTime ModifiedOn { get; set; }
      public int ModifiedBy { get; set; }
  }
  </code></pre>
  
  <p>And, for eg. I have two classes like</p>
  
  <pre><code>public class Employee : CommonFields
  {
      public int Id { get; set; }
      public string Name { get; set; }
      //Other properties
  }
  
  public class User : CommonFields
  {
      public int Id { get; set; }
      public string Name { get; set; }
      //Other properties
  }
  </code></pre>
  
  <p>How can I set relation from CreatedBy &amp; ModifiedBy to User table. I just need only one directional mapping (I don't want FK to be created in my User Table).</p>
  
  <p>I need to get User information when I write objEmployee.CreatedUser</p>
  
  <p>Thanks.</p>