Primary key is such an attribute which uniquely identify the record. Some times we needs more then one keys to find the specific record such scenario in which more than one keys are used to find the specific data is called the composite primary key.

From here.


Unable to determine composite primary key ordering for type 'MvcApplication7.Models.MyMaster'. Use the ColumnAttribute or the HasKey method to specify an order for composite primary keys.



public class MyMaster
	[Column(Order = 0)]
	public int myField1 { get; set; }
	[Column(Order = 1)]
	public int myField2 { get; set; }
	public string Username { get; set; }