I have 2 classes at the moment. The first is an asset, the second is services associated with that asset. The Asset table in SQL Server has a PK over both ID and workflow_id.
public class Asset
{
public int ID { get; set; }
public int workflow_id { get; set; }
public string name { get; set; }
}
The second table is services which has a PK over the 3 columns, the service ID, workflow_id and the asset_id the service is tied too.
public class Services
{
public int ID { get; set; }
public int workflow_id { get; set; }
public int asset_id { get; set; }
public string service_description { get; set; }
}
Example Data: Asset with ID#10 in workflow_id#27 matches all the Services with asset_id#10 in workflow_id#27.
How can I map these two together with the multi-column PKs?