views:

225

answers:

1

I have this 2 tables

table name: Person with Columns:PersonID, Name

table name: VisitInfo with Columns: VisitPersonID , CoordinatorPersonID

both columns have a foreign key to person table

When i generate the code i get a VisitInfo class with the properties:

  • Person
  • CoordinatorPerson

But what i want is a VisitInfoClass with the following properties:

  • VisitPerson
  • CoordiniatorPerson

When generating the code file, sql metal begins to refer to the collumn name only for the second foreign key to the same table.

any ideas?

A: 

Would:
VisitInfo.PersonByVisitPersonID
VisitInfo.PersonByCoordinatorPersonID
...be any closer to what you want?

If so, my add-in for L2S has an option to use the navigation property naming style above...

You can download it, and get a free trial license at http://www.huagati.com/dbmltools/

KristoferA - Huagati.com