How to get the сollection of custom Magento 2 modules

- Magento 2

Magento 2 Development

Take your constructor and inject the model collection factory into it:

It is possible to use it in any class method:

$collection = $this->mymodulemodelFactory->create();

More tips from Magento 2 Developer’s Cookbook

Source (Magento Stackexchange Question) (Marius)