View Providers

  • 9/20/2019 1:30:50 PM

  • Less than 1 minute to read

All views within Plato are composed or built by view providers. View providers within Plato implement the IViewProvider<TModel> interface.

Each page within Plato is a generic layout and view providers will inject view components or partial views into certain regions or zones of this generic layout depending upon the registered implementations of IViewProvider<TModel>.

The current view is represented by the generic type parameter of the IViewProvider implementation. For example IViewProvider<User> is used to represent all user views within Plato. If your view provider is simple and does not need to implement all of the functionality exposed via the IViewProvider interface you can optionally inherit from the BaseViewProvider<TModel> base class.

We are still early with Plato and view providers may change. We would encourage you to explore the Plato source code to understand how view providers work. We will develop this documentation as Plato matures and view providers stabilise. If we can assist please leave feedback on this document.

Can we improve this doc? Login or register to tell us how
Your Feedback
In this doc