You can see in the core. The class \Magento\Catalog\Model\ProductRepository
implements interface \Magento\Catalog\Api\ProductRepositoryInterface
. So basically, you can use the function get($sku)
of both. The difference is the ProductRepositoryInterface
usually use with the API as you see. If you don't use the API, use the ProductRepository
.
The ProductRepositoryInterface
with no content in the method so you can find it in var/generation/Magento/Catalog/Api/ProductRepositoryInterface
. Magento will auto generate the code.
There are what I find out! Hope it help!