Skip to content

Commit

Permalink
add index to last connection for improved search speed
Browse files Browse the repository at this point in the history
  • Loading branch information
RaidMax committed Jan 24, 2023
1 parent aecb17d commit 914047b
Show file tree
Hide file tree
Showing 10 changed files with 5,058 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Data/Context/DatabaseContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
// make network id unique
modelBuilder.Entity<EFClient>(entity =>
{
entity.HasIndex(e => e.NetworkId);
entity.HasIndex(client => client.NetworkId);
entity.HasIndex(client => client.LastConnection);
entity.HasAlternateKey(client => new
{
client.NetworkId,
Expand Down
Loading

0 comments on commit 914047b

Please sign in to comment.