예제 #1
0
 public async static Task AddNewAsync(AttackLog item)
 {
     using (var db = new LogDb())
     {
         db.Deaths.Add(item);
         await db.SaveChangesAsync();
     }
 }
예제 #2
0
 public async static void AddNew(CommandLog item)
 {
     using (var db = new LogDb())
     {
         db.Commands.Add(item);
         await db.SaveChangesAsync();
     }
 }
예제 #3
0
 public async static void AddNew(WeaponLog item)
 {
     using (var db = new LogDb())
     {
         db.Weapons.Add(item);
         await db.SaveChangesAsync();
     }
 }
예제 #4
0
 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();
     }
 }