EF Core Table Splitting - One table to multiple classes
问题 My table has four columns and I want to split it between multiple classes. table1 key col1 col2 col3 col4 Class ClassA key col1 col2 class ClassB key col3 col4 modelBuilder.Entity().ToTable("table1"); modelBuilder.Entity().ToTable("table1"); Currently it give me System.InvalidOperationException: 'Cannot use table 'table1' for entity type 'ClassB' since it is being used for entity type 'ClassA' Is it possible in EF Core? Thanks 回答1: You may need a relationship defined like the following based