示例#1
0
 public async Task RemoveAsync(T entry)
 {
     using (GeneralContext database = new GeneralContext())
     {
         database.Remove(entry);
         await database.SaveChangesAsync().ConfigureAwait(false);
     }
 }
示例#2
0
 protected async Task UpdateAsync(T entry)
 {
     using (GeneralContext database = new GeneralContext())
     {
         database.Update(entry);
         await database.SaveChangesAsync().ConfigureAwait(false);
     }
 }