I want to separate the two ways a widget can be bound, in order to prevent further confusion.
Local binding - here a widget is bound to a model, and is read only. No services are invoked here, and the binding is one-way (no editing). This is implemented either by passing the model in the constructor of the widget, or using the BindTo method. For instance:
Modifying this sample to work with RazorPages is as simple as passing the model field that holds the collection into the Grid constructor.
Remote binding - here the widget is bound to remote endpoints, being MVC Controller, WebAPI, OData, SignalR etc. Here the datasource is capable of full CRUD operations. However this doesn't use the model of the page, and has to reference service endpoints. Currently such endpoints are not supported by RazorPages (or the support is clunky at best). Therefore in such scenarios you need to reference a service layer, not located in the RazorPage.