Capgemini Interview Question

why we resource interface in magento2