title: How can I inherit using TPT using EntityFramework from different Views?
body: <p>Supposing I have two tables Meetings and Attendees.
  My database looks like this.</p>
  
  <pre><code>// Table Meeting 
  Id
  Description
  // other properties ...
  
  // Attendee 
  Id 
  Name
  MeetingId
  // other properties ...
  </code></pre>
  
  <p>I have two views that are mapped to these tables. One is ViewMeetings with just the meeting data the other ViewMeetingAttendees joined with Attendees.</p>
  
  <p>I want to use table per type(TPT), mapping each table to a view.</p>
  
  <pre><code>public abstract class MeetingBase 
  {
      // Some properties here
  }
  
  public class ViewMeeting : MeetingBase
  { 
  }
  
  public class ViewMeetingAttendee : MeetingBase
  {
        public String AttendeeName { get;set; }
  }
  
  // Configuration
  moduleBuilder.Entity&lt;ViewMeeting&gt;().ToTable("ViewMeetings");
  moduleBuilder.Entity&lt;ViewMeetingAttendee&gt;().ToTable("ViewMeetingAttendees");
  // NOTE fixed the ViewMeeting error as stated in HansVG answer below.
  </code></pre>
  
  <p>Every time I try to run this code I get an error Invalid Column Name "Discriminator"</p>
  
  <p>I understand that the entity framework is trying to resolve the types as a table per hierarchy(TPH). However, I still want to map the properties using inheritance without the inferred TPH. This is reasonable since all the columns are the same except for one. I have ten other columns and two views. Also I have a single meeting entity needing most of the same columns for CRUD operations. </p>
  
  <p>Is there a way to keep the inheritance but lose the discriminator error? [NotMapped] is not an option since I am still pulling the data from the database. Also, I don't prefer to join the tables locally using LINQ since there are joined entities that don't need to be mapped otherwise. </p>