Model binding
The Sitecore Rendering Engine provides ASP.NET model binding support for key objects, properties, and fields returned by the Layout Service in a SitecoreLayoutResponse object.
Model binding is done with IFieldReader and is case sensitive. If a model property is not mapped through attributes, default ASP.NET Model-View-Controller model binding behavior takes over.
The attributes, sources, providers, and so on are located in the Sitecore.AspNet.RenderingEngine.Binding namespace of the RE libraries.
Model properties that implement IField do not require explicit attributes and bind to the current component or current route field of the same name.
The current component, response, or route refer to the corresponding objects in the SitecoreLayoutResponse instance that are available as context information on the HttpContext object. For a given request, the current response and route is the same for all components, but the current component is set dynamically by the placeholder tag helper.
An example Layout Service response:
A matching view model class:
For an example of a context extension, see Extending Context Data Returned by the Layout Service.