Search code examples
asp.netdynamic-data

Dynamic Data Linked Field Names


I have a couple of tables roughly as follows (ignore the bad db design, just trying to simplify)

Person
------
Id
Child_1 (FK back to person)
Child_2 (FK back to person)

When I apply the asp.net dynamic data to the linq to sql model generated by this I get columns in the grid named, "Id", "Person1" and "Person2" it seems to be using the name of the table referenced by the foreign keys rather than the column name (which seems a little odd to me)

What's the easiest way to configure it to use column names instead?


Solution

  • It seems that you can change the names used by association in the linq to sql designer.

    Click on the link itself and then set the properties for the parent and child names.

    This seems a little time intensive for something you might expect it to have done anyway.