ViewComponent
s are also used when you need a partial view, that requires a model to be called in _Layout. To avoid writing C# code to create the model in the Layout, it's best to use a ViewComponent
that can make use of the Services configured for the application, same as controllers, through dependency injection.