title: Entity Framework - relationship with fake Foreign Key (no foreign key in the db)
body: <p>I have many tables that have TextID column which refers to the translation table. Translation table needs also LanguageID to get translated text in desired language. My problem is that I do not have LanguageID in my database, it is predefined in the system and I do not know how can I define it using Fluent API, i.e this can be my model:</p>
  
  <pre><code>public partial class MyEntity
  {    
      public short ID { get; set; }
      public Nullable&lt;int&gt; TextID { get; set; }
      [NotMapped]
      public Nullable&lt;int&gt; LanguageID { get; set; }
      public virtual TEXT_TRANSLATION Translation { get; set; }
  }
  </code></pre>
  
  <p>And the translation table:</p>
  
  <pre><code>public partial class TEXT_TRANSLATION
  {
      [Key, Column(Order = 0)]
      public int TextID { get; set; }
  
      [Key, Column(Order = 1)]
      public int LanguageID { get; set; }
  
      public string TranslatedText { get; set; } 
  }
  </code></pre>
  
  <p>Basically I need navigation like this:</p>
  
  <pre><code>myEntity.Translation.TranslatedText
  </code></pre>
  
  <p>While using SQL, I would do it like this:</p>
  
  <pre><code>Left Join TEXT_TRANSLATION ON 
    MyEntity.TextID = TEXT_TRANSLATION.TextID 
    AND TEXT_TRANSLATION.LanguageID = 1033 
  </code></pre>
  
  <p>Basically I want to use TextID foreign key and get <strong>ONLY ONE</strong> translation - LanguageID is static and predefined in context. </p>
  
  <p>I can't change existing DB schema. It would be perfect if I won't need to map LanguageID field in my code, just use it inside mapping like a system parameter. Is it even possible with EF?</p>