added editorconfig and formatted code

This commit is contained in:
hydrant
2019-07-17 19:52:55 +02:00
parent ada071cc93
commit 123ab7d07b
146 changed files with 10839 additions and 10715 deletions

View File

@@ -12,28 +12,28 @@ using System.Linq;
namespace ReallifeGamemode.Server.Entities
{
public class Faction : IBankAccountOwner
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
[StringLength(32)]
public string Name { get; set; }
public bool StateOwned { get; set; }
public class Faction : IBankAccountOwner
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
[StringLength(32)]
public string Name { get; set; }
public bool StateOwned { get; set; }
public IBankAccount GetBankAccount(DatabaseContext databaseContext = null)
public IBankAccount GetBankAccount(DatabaseContext databaseContext = null)
{
if (databaseContext == null)
{
using (databaseContext = new DatabaseContext())
{
if (databaseContext == null)
{
using (databaseContext = new DatabaseContext())
{
return databaseContext.FactionBankAccounts.FirstOrDefault(u => u.FactionId == this.Id);
}
}
else
{
return databaseContext.FactionBankAccounts.FirstOrDefault(u => u.FactionId == this.Id);
}
return databaseContext.FactionBankAccounts.FirstOrDefault(u => u.FactionId == this.Id);
}
}
else
{
return databaseContext.FactionBankAccounts.FirstOrDefault(u => u.FactionId == this.Id);
}
}
}
}