mirror of
https://github.com/CyberL1/Minecraft-Realms-Emulator.git
synced 2024-12-22 04:18:21 -05:00
fix: use Any
instead of FirstOrDefault
This commit is contained in:
parent
accaab7ae5
commit
3e9b6a55de
@ -13,7 +13,7 @@ namespace Minecraft_Realms_Emulator.Helpers
|
||||
|
||||
db.Database.Migrate();
|
||||
|
||||
if (db.Configuration.FirstOrDefault(s => s.Key == "newsLink") == null)
|
||||
if (!db.Configuration.Any(s => s.Key == "newsLink"))
|
||||
{
|
||||
var newsLink = new Configuration
|
||||
{
|
||||
@ -24,7 +24,7 @@ namespace Minecraft_Realms_Emulator.Helpers
|
||||
db.Configuration.Add(newsLink);
|
||||
}
|
||||
|
||||
if (db.Configuration.FirstOrDefault(s => s.Key == "defaultServerAddress") == null)
|
||||
if (!db.Configuration.Any(s => s.Key == "defaultServerAddress"))
|
||||
{
|
||||
var defaultServerAddress = new Configuration
|
||||
{
|
||||
@ -35,7 +35,7 @@ namespace Minecraft_Realms_Emulator.Helpers
|
||||
db.Configuration.Add(defaultServerAddress);
|
||||
}
|
||||
|
||||
if (db.Configuration.FirstOrDefault(x => x.Key == "trialMode") == null)
|
||||
if (!db.Configuration.Any(x => x.Key == "trialMode"))
|
||||
{
|
||||
var trialMode = new Configuration
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user