title: Access child entities' properties from base entity
body: <p>More than one year later from my first question on SO (<a href="https://stackoverflow.com/questions/9101971/filter-base-entity-from-child-entities-properties">Filter base entity from child entities&#39; properties</a>), I have a similar problem. </p>
  
  <p>I have an abstract base type</p>
  
  <pre><code>public abstract class Base{
  }
  </code></pre>
  
  <p>I have some child entities that inherits from this Base Type</p>
  
  <pre><code>public class Child1 : Base{
      public virtual NavigationProperty NavigationProperty {get; set; }
      public int NavigationPropertyId {get; set}
  }
  
  public class Child2 : Base{
      public virtual NavigationProperty NavigationProperty {get; set; }
  }
  </code></pre>
  
  <p>The child entities all have NavigationProperty property. And the NavigationProperty class is like</p>
  
  <pre><code> public class NavigationProperty{
      public virtual ICollection&lt;Child1&gt; Child1s {get; set;}
      public virtual Child2 Child2s {get; set;}
   }
  </code></pre>
  
  <p>There one-to-one mapping between Child2 and NavigationProperty; one-to-many relationship between Child1 and NavigationProperty. In order to these mapping to work i am using TPT. My first question is, can I move </p>
  
  <pre><code>  public NavigationProperty NavigationProperty {get; set; }
  </code></pre>
  
  <p>to Base class?</p>
  
  <p>I am trying this for a whole day and did not have any success. If it is not possible can i at least access the NavigationProperty from the base type. After all the childs have this property, I tried something like </p>
  
  <pre><code> public abstract class Base{
        public abstract NavigationProperty NavigationProperty {get; set; }
   }
   ....
   public abstract class Child2{
        public override NavigationProperty NavigationProperty {get; set; }
   }
  </code></pre>
  
  <p>But entity framework gives the following error. </p>
  
  <pre><code> Sequence contains more than one matching element 
  </code></pre>
  
  <p>I can use something like </p>
  
  <pre><code>   public abstract class Base{
        public abstract NavigationProperty GetNavigationProperty();
     }
  
    public abstract class Child2{
        public override NavigationProperty NavigationProperty {get; set; }
        public override NavigationProperty GetNavigationProperty(){
             return NavigationProperty;
        }
   }
  </code></pre>
  
  <p>But I do not want to introduce these extra methods. Are they any way to achieve this more elegantly?</p>
  
  <p>Edit: </p>
  
  <p>I forgot to mention that I have already tried putting <code>[NotMapped]</code> attribute.  I guess EF <code>[NotMapped]</code> attribute is inherited too so the child properties are not mapped too.</p>
  
  <p>I do not expect to Linq-to-Entites to work. I do not want to be able to query base entities with navigation properties. I simply want to get rid of GetNavigationProperty and SetNavigationProperty methods. So when i try to access NavigationProperty from base class it should be loaded into memory, that's all. However, after a week of effort, I do not think it is possible.</p>