Object's PK

Object's PK

Old forum URL: forums.lhotka.net/forums/t/1473.aspx


Crestline posted on Thursday, October 12, 2006

When in the CSLA templates, is there any way to refer to an objects primary key?  I can see that an object has a property of isPrimaryKey, but is there a way to just refer to it?  Something like ObjInfo.PrimaryKey...

Thanks.

rasupit replied on Friday, October 13, 2006

You could use ObjInfo.UniqueProperties to loop through all properties that are marked unique/primary key.
Ricky

Copyright (c) Marimer LLC