formatted code

This commit is contained in:
Lennart Kampshoff
2019-05-05 17:59:11 +02:00
parent a34c03eae9
commit a88d5256a8
54 changed files with 290 additions and 210 deletions

View File

@@ -25,7 +25,7 @@ namespace ReallifeGamemode.Server.Extensions
public static User GetUser(this Client client, DatabaseContext context = null)
{
if (!client.IsLoggedIn()) return null;
if(context == null)
if (context == null)
{
using (context = new DatabaseContext())
{
@@ -33,7 +33,8 @@ namespace ReallifeGamemode.Server.Extensions
.Users
.Include(u => u.Faction)
.Include(u => u.FactionRank)
.FirstOrDefault(u => u.Name == client.Name);
.Where(u => u.Name == client.Name)
.FirstOrDefault();
}
}
else
@@ -42,7 +43,8 @@ namespace ReallifeGamemode.Server.Extensions
.Users
.Include(u => u.Faction)
.Include(u => u.FactionRank)
.FirstOrDefault(u => u.Name == client.Name);
.Where(u => u.Name == client.Name)
.FirstOrDefault();
}
}