title: Using List<BaseType> as a field for entity for holding derived entity using Entity Framework?
body: <p>Suppose I have an entity, representing recurring event:</p>
  
  <pre><code>public class ReccuringEvent : EntityBase, IReccuringEvent
  {
      public virtual ICollection&lt;ReccuringElementBase&gt; IncludedElements { get; private set; }
      public virtual ICollection&lt;ReccuringElementBase&gt; ExcludedElements { get; private set; }
  }
  </code></pre>
  
  <p>And suppose I have a bunch of entities that derived from ReccuringElementBase (this class hold some shared data for Monthly, Weekly). E.g.:</p>
  
  <pre><code>public class ReccuringElementBase
  {
      public DateTime _startFrom { get; private set; }
      public DateTime _endBy { get; private set; }
      ...
  }
  
  public class Monthly : ReccuringElementBase
  {
      public int MonthToPerform { get; private set; }
      ...
  }
  </code></pre>
  
  <p>What I want is to hold them (Weekly, Monthly, etc) in List&lt;'ReccuringElementBase> InlcudedElements/ExcludedElements. Entity Framework can handle situations when you explicitly use a derived class as a Property or Property Collection (like  Monthly/Weekly in SomeReccuringRule entity) and map them  in to a database table (using Table Per Hierarchy (TPH), Table Per Type (TPT), Table Per Concrete Class (TPC)):</p>
  
  <pre><code>public class SomeReccuringRule : EntityBase
  {
      public Monthly { get; private set; }
      public Weekly { get; private set; }
      ...
  }
  </code></pre>
  
  <p>However, I have something different. Can Entity Framework map Property of type ICollection&lt;'ReccuringElementBase> (which must hold Monthly, Weekly, etc) to database, and if yes, how it can be implemented?</p>