chigusa
0
Q:

ef code first unique constraint

//single index
[Index("IX_First", IsUnique = true)]
public int FirstColumn { get; set; }

// composite index
[Index("IX_FirstAndSecond", 1, IsUnique = true)]
public int FirstColumn { get; set; }

[Index("IX_FirstAndSecond", 2, IsUnique = true)]
public int SecondColumn { get; set; }
1

New to Communities?

Join the community