public async static Task AddNewAsync(AttackLog item) { using (var db = new LogDb()) { db.Deaths.Add(item); await db.SaveChangesAsync(); } }
public async static void AddNew(CommandLog item) { using (var db = new LogDb()) { db.Commands.Add(item); await db.SaveChangesAsync(); } }
public async static void AddNew(WeaponLog item) { using (var db = new LogDb()) { db.Weapons.Add(item); await db.SaveChangesAsync(); } }
public async static void UpdateAsync(CommandLog item) { using (var db = new LogDb()) { db.Commands.Attach(item); db.Entry(item).State = System.Data.Entity.EntityState.Modified; await db.SaveChangesAsync(); } }