The PageModelService defines the functionality and behaviour required by your Razor PageModel. So in the case of a Customer Razor page, the PageModelService could implement functions sush as GetOrderList(), UpdateProfile() etc. The PageModelService is implemented as a reference on the PageModel class.

So the PageModelService doesn’t receive any services, but rather it defines them.

Does that make sense? If not I could do a follow up article and give a more detailed example.

A father, cyclist, vegetarian, atheist, geek and multiple award winning technical author. Loves real ale, fine wine and good music. All round decent chap.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store