Skip to content

Commit 31ec481

Browse files
committed
Added index annotations to the demo/test-application
1 parent 433c1da commit 31ec481

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

SQLite.CodeFirst.Console/Entity/Player.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ public class Player : IEntity
88
{
99
public int Id { get; set; }
1010

11+
[Index] // Automatically named 'IX_FirstName'
1112
[MaxLength(50)]
1213
public string FirstName { get; set; }
1314

15+
[Index("IX_LN")]
1416
[MaxLength(50)]
1517
public string LastName { get; set; }
1618

SQLite.CodeFirst.Console/Entity/Stadion.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ public class Stadion
77
{
88
[Key]
99
[Column(Order = 1)]
10+
[Index("IX_Main", Order = 2)]
1011
public string Name { get; set; }
1112

1213
[Key]
1314
[Column(Order = 2)]
15+
[Index("IX_Main", Order = 1)]
1416
public string Street { get; set; }
1517

1618
[Key]

0 commit comments

Comments
 (0)