Example #1
0
 public async static void AddNew(CashLog item)
 {
     using (var db = new LogDb())
     {
         db.Cash.Add(item);
         await db.SaveChangesAsync();
     }
 }
Example #2
0
 public async static void UpdateAsync(CashLog item)
 {
     using (var db = new LogDb())
     {
         db.Cash.Attach(item);
         db.Entry(item).State = System.Data.Entity.EntityState.Modified;
         await db.SaveChangesAsync();
     }
 }