//Release the database and resources protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { using (var db = new SystemContext()) { if (disposing) { db.Dispose(); } base.Dispose(disposing); } }
private void Dispose(bool disposing) { if (!disposed) { if (disposing) { reposiroties = null; context.Dispose(); } } disposed = true; }
public void Dispose() { _context.Dispose(); }