Exemple #1
0
 public async static Task AddNewAsync(AttackLog item)
 {
     using (var db = new LogDb())
     {
         db.Deaths.Add(item);
         await db.SaveChangesAsync();
     }
 }
Exemple #2
0
 public async static void UpdateAsync(AttackLog item)
 {
     using (var db = new LogDb())
     {
         db.Deaths.Attach(item);
         db.Entry(item).State = System.Data.Entity.EntityState.Modified;
         await db.SaveChangesAsync();
     }
 }