I am working with DAL2 in DNN 7+.
I have a database table with a primary key created from 2-varchar(50) fields.
What is the proper way to declare the multi-field primary key in the attributes of the object?
I typically do:
[PrimaryKey("myField")]
Should I just add a second PrimaryKey attribute?
The second part of the question is how to get the data out of the database.
I would like to use the GetById() function because it incorporates caching but it doesn't appear to support multiple fields. Am I stuck using the Find() method and handling caching manually or what is the best way to select objects that use a multiple field primary keys?
"Look to the sky as much as the screen!"