Skip to content

Commit 4f06cfd

Browse files
author
Marc Sallin
committed
#60: Example code for composite indices with unique flag.
1 parent 38c161f commit 4f06cfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SQLite.CodeFirst.Console/Entity/Stadion.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ public class Stadion
77
{
88
[Key]
99
[Column(Order = 1)]
10-
[Index("IX_Stadion_Main", Order = 2)] // Test for combined, named index
10+
[Index("IX_Stadion_Main", Order = 2, IsUnique = true)] // Test for combined, named index
1111
public string Name { get; set; }
1212

1313
[Key]
1414
[Column(Order = 2)]
15-
[Index("IX_Stadion_Main", Order = 1)] // Test for combined, named index
15+
[Index("IX_Stadion_Main", Order = 1, IsUnique = true)] // Test for combined, named index
1616
public string Street { get; set; }
1717

1818
[Key]

0 commit comments

Comments
 (0)