protected void Dispose(bool disposing) { if (isDisposed) { return; } isDisposed = true; PerformedWrite |= Context.SaveChanges(transaction) > 0; usageCompleted?.Invoke(this); }
protected void Dispose(bool disposing) { if (isDisposed) { return; } isDisposed = true; try { PerformedWrite |= Context.SaveChanges() > 0; } catch (Exception e) { Errors.Add(e); throw; } finally { usageCompleted?.Invoke(this); } }