Skip to content

Commit 5d83d76

Browse files
committed
EFC linq parser = poop
1 parent 8e9c602 commit 5d83d76

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

CHEF/Components/Commands/Ignore/Ignore.cs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,16 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
2727

2828
public async Task<Ignore> GetIgnore(ulong discordId) =>
2929
await UserIds.AsQueryable()
30-
.FirstOrDefaultAsync(i => i.Equals(discordId));
30+
.FirstOrDefaultAsync(i => i.DiscordId == discordId);
3131

3232

3333
public async Task<bool> IsIgnored(SocketUser user) =>
34-
await UserIds.AsQueryable().AnyAsync(i => i.Equals(user));
34+
await UserIds.AsQueryable().AnyAsync(i => i.DiscordId == user.Id);
3535
}
3636

3737
public class Ignore
3838
{
3939
[Key]
4040
public ulong DiscordId { get; set; }
41-
42-
public bool Equals(ulong discordId)
43-
{
44-
return DiscordId == discordId;
45-
}
46-
47-
public bool Equals(SocketUser user)
48-
{
49-
return DiscordId == user.Id;
50-
}
5141
}
5242
}

0 commit comments

Comments
 (0)