[Table("Table_UserImages")]
public class UserImage
{
[Key, Column("UserID")]
public Nullable<Guid> UserID { get; set; }
[Key, Column("ImageID")]
public Nullable<int> ImageID { get; set; }
}
Both column are Primary key
but model only accept one Key at a time,then how can i over come this? have any solution ? please share?
I believe you’re describing a composite key, that is a key composed of two or more columns.
To describe this in EF, you need to also define the column ordering for the keys. Like this: