Exploring ASP.NET Core (Part 6 of 6): View Components
Interactive

Exploring ASP.NET Core (Part 6 of 6): View Components

Biz Library
Updated Feb 04, 2020

Explore the concepts behind View Components, learn how they’re put together as a combination of a class and a view, and find out how to create and use them. Get a feel for just how simple and straightforward View Components can be by still being as sophisticated as you’d like by taking a look at an example of an app that shows a way to reuse summary data throughout a website. Dig deeper into the details and build a new project that uses a View Component to display various lists of our dogs. Explore some interesting features of an ASP.NET Core application, including how to use Entity Framework Core to support the data that the View Component needs. Along the way, take a look at another example of using Dependency Injection, here in a View Component, and an interesting way to define that service.


Lesson 1:

  • Introducing View Components
  • Uses for View Components
  • View Component Class
  • View Component Method
  • Using a View Component
  • Summary: View Component Advantages.

Lesson 2:

  • Demo: View Component Example 1
  • Demo: The Models
  • Demo: The InvokeAsync Method
  • Demo: Invoking the View Component.

Lesson 3:

  • Entity Framework Core
  • Demo: Building an Application
  • Demo: Update Via Nuget
  • Demo: Installing Entity Framework
  • Demo: Creating the Model
  • Demo: Creating the Object Context
  • Demo: Adding the Entity Framework Service
  • Demo: Creating a Service
  • Demo: Defining Another Service
  • Demo: Method Implementation.

Lesson 4:

  • Demo: Using View Components
  • Demo: Add the View
  • Demo: View Component Features
  • Demo: The Dogs View Component
  • Demo: Modify the Views.