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(); } }