Entity Framework Primary Key Navigation Property Naming Scheme RRS feed

  • Question

  • Hello,


    Suppose I had TableA with 2 relationship references to TableB, where TableB is the primary key (let's say it has a PrimaryBKey and SecondaryBKey columns as the FK names in TableA).  So I have entity:

        public TableB TableB { .. } 
        public TableB TableB1 { .. } 

    Is there any documentation on how EF derives the naming scheme, and can it change?  I have developers telling me that when they regen a table, it's changing the ordering of relationships.  What I mean  by that is that originally the entity was mapped in this way:

    PrimaryBKey = TableB1
    SecondaryBKey = TableB

    But they said that it was switched later on to:

     PrimaryBKey = TableB
    SecondaryBKey = TableB1

    Is that even possible?  I can't quite find any documentation on the naming scheme to verify this.

    Tuesday, July 19, 2011 6:14 PM

All replies