Im a newbie too, so I'd appreciate knowing an easier way than this
(Maybe a primary key collection somewhere)
foreach (EntityColumn ec in EntityColumn.GetEntityColumns(typeof(Employee))) {
if (ec.IsPrimaryKeyColumn) {
// This is a primary key column
}
}
or
For Each ec As EntityColumn In EntityColumn.GetEntityColumns(GetType(Employee))
If ec.IsPrimaryKeyColumn Then
' This is a primary key column
End If
Next