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

@@ -13,33 +13,33 @@ using System.Linq;
namespace ReallifeGamemode.Server.Entities
{
public class UserBankAccount : IBankAccount
{
[NotMapped]
private int _balance;
public class UserBankAccount : IBankAccount
{
[NotMapped]
private int _balance;
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
[ForeignKey("User")]
public int UserId { get; set; }
public User User { get; set; }
[StringLength(12)]
public string Bic { get; set; }
[StringLength(32)]
public string Iban { get; set; }
public int Balance
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
[ForeignKey("User")]
public int UserId { get; set; }
public User User { get; set; }
[StringLength(12)]
public string Bic { get; set; }
[StringLength(32)]
public string Iban { get; set; }
public int Balance
{
get => _balance;
set
{
_balance = value;
using (var dbContext = new DatabaseContext())
{
get => _balance;
set
{
_balance = value;
using (var dbContext = new DatabaseContext())
{
ClientService.GetClientByNameOrId(dbContext.Users.First(u => u.Id == UserId).Name).TriggerEvent("updateMoney", value);
}
}
ClientService.GetClientByNameOrId(dbContext.Users.First(u => u.Id == UserId).Name).TriggerEvent("updateMoney", value);
}
public bool Active { get; set; }
}
}
public bool Active { get; set; }
}
}