Simplified /cleaned some code parts
This commit is contained in:
@@ -19,7 +19,6 @@ namespace reallife_gamemode.Server.Extensions
|
||||
{
|
||||
public static FactionBankAccount GetFactionBankAccount(this Faction faction, DatabaseContext context = null)
|
||||
{
|
||||
using (DatabaseContext dbContext = new DatabaseContext())
|
||||
if (context == null)
|
||||
{
|
||||
using (context = new DatabaseContext())
|
||||
@@ -30,7 +29,7 @@ namespace reallife_gamemode.Server.Extensions
|
||||
else
|
||||
{
|
||||
return context.FactionBankAccounts.FirstOrDefault(u => u.FactionId == faction.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user