how can we use
$resource = Mage::getSingleton('core/resource');
$readConnection = $resource->getConnection('core_read');
$tableName = $resource->getTableName('sales/order');
in magento2?
What is the replacement of core/resource in magento2?
I have tried with \Magento\Framework\Setup\SchemaSetupInterface
but its not instantiating in block or model classes.