Definition:

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.

Error:

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.

Solution:

 

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