When should I consider representing the primary-key ...?
- by JMSA
When should I consider representing the primary-key as classes?
Should we only represent primary keys as classes when a table uses composite-key?
For example:
public class PrimaryKey
{ ... ... ...}
Then
private PrimaryKey _parentID;
public PrimaryKey ParentID
{
get { return _parentID; }
set { _parentID = value; }
}
And
public void Delete(PrimaryKey id)
{...}
When should I consider storing data as comma-separated values in a column in a DB table rather than storing them in different columns?