//public void CheckDisposed() //{ // if (_dbContext == null) // { // throw new ObjectDisposedException("PersonRepository"); // } //} public void Dispose() { if (!_dbContext.TryDispose()) { return; } _dbContext = null; }
//public void CheckDisposed() //{ // if (_dbContext == null) // { // throw new ObjectDisposedException("PersonRepository"); // } //} public void Dispose() { if (!_dbContext.TryDispose()) { return; } _dbContext = null; }