protected override void Dispose(bool disposing) { courseService.Dispose(); lecturerService.Dispose(); topicService.Dispose(); base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing && _userManager != null) { _userManager.Dispose(); _userManager = null; } studentService.Dispose(); lecturerService.Dispose(); courseService.Dispose(); progressService.Dispose(); departmentService.Dispose(); base.Dispose(disposing); }
private bool disposedValue = false; // To detect redundant calls protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { _lecturerService.Dispose(); _studentService.Dispose(); } // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below. // TODO: set large fields to null. disposedValue = true; } }