Entity splitting when key column has different names?
问题 I'm using Entity Framework 4.3.1 Code-First and I need to split an entity between two tables. The tables have a primary key shared, and it is 1-to-1, but the columns are not named the same on each table. I don't control the data layout, nor can I request any changes. So for example, the SQL tables could be And this would be my entity... public class MyEntity { public int Id {get; set;} public string Name {get;set} public string FromAnotherTable {get;set;} } And here is the mapping I have.