How bind data to grid from database in Vaadin 8

Hello!
In Vaadin 7 for bind data to grid I use setContainerDataSource method of grid object.
In Vaadin 8 grid don’t have this method, how bind data from database table in grid in vaadin 8?

This is one of the major differences between Vaadin 7 and 8.

In Vaadin 8 there is new concept DataProvider. E.g. if you used to have BeanItemContainer in Vaadin 7, you should use ListDataProvider in Vaadin 8.

When you instiate a Grid in Vaadin 8, it will use ListDataProvider by default. So you can use Grid.setItems(…) to set collection of beans. Alternatively you can instatantiate specific DataProvider variant (e.g. if you have implemented custom one) and set it as data source
Grid.setDataProvider() method.

DataProvider is used by ComboBox, ListSelect also.

More info can be found here:
https://vaadin.com/docs/v8/framework/datamodel/datamodel-providers.html