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

Exploring ASP.NET Core, Part 6 of 6: View Components

LearnNow Online
Updated Aug 22, 2018

Course description

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.

Each LearnNowOnline training course is made up of Modules (typically an hour in length). Within each module there are Topics (typically 15-30 minutes each) and Subtopics (typically 2-5 minutes each). There is a Post Exam for each Module that must be passed with a score of 70% or higher to successfully and fully complete the course.


Prerequisites

This course assumes that students have some programming background, and at least minimal experience with classic ASP.NET, C#, and Visual Studio. As with any such course, the more experience you bring to the course, the more you'll get out of it. This course moves quickly through a broad range of programming topics, and is focused on using the .NET Framework with C#. The course also assumed that you are well familiar with how to use the version of Windows that you are running. For example, the course might say simply open a browser duo; without explaining how to do that. You should also be able to navigate the folder hierarchy using Windows Explorer.


Meet the expert

Don Kiely

Don Kiely is a featured instructor on many of our SQL Server and Visual Studio courses. He is a nationally recognized author, instructor, and consultant specializing in Microsoft technologies. Don has many years of teaching experience, is the author or co-author of several programming books, and has spoken at many industry conferences and user groups. In addition, Don is a consultant for a variety of companies that develop distributed applications for public and private organizations.

Video Runtime

111 Minutes

Time to complete

186 Minutes

Course Outline

Working with View Components

Introduction To View Components (22:24)

  • Introduction (00:58)
  • Introducing View Components (04:54)
  • Uses for View Components (03:02)
  • View Component Class (04:27)
  • View Component Method (02:40)
  • Using a View Component (04:37)
  • Summary: View Component Advantages (01:16)
  • Summary (00:27)

View Component Demo (18:40)

  • Introduction (00:34)
  • Demo: View Component Example 1 (04:57)
  • Demo: The Models (04:32)
  • Demo: The InvokeAsync Method (03:12)
  • Demo: Invoking the View Component (04:54)
  • Summary (00:28)

Building with Entity Framework Core (45:02)

  • Introduction (00:53)
  • Entity Framework Core (04:01)
  • Demo: Building an Application (04:08)
  • Demo: Update Via Nuget (05:49)
  • Demo: Installing Entity Framework (04:22)
  • Demo: Creating the Model (04:36)
  • Demo: Creating the Object Context (02:48)
  • Demo: Adding the Entity Framework Service (04:02)
  • Demo: Creating a Service (05:19)
  • Demo: Defining Another Service (05:20)
  • Demo: Method Implementation (02:16)
  • Summary (01:22)

Building a View Component (25:23)

  • Introduction (00:56)
  • Demo: Using View Components (05:44)
  • Demo: Add the View (04:08)
  • Demo: View Component Features (03:10)
  • Demo: The Dogs View Component (04:57)
  • Demo: Modify the Views (05:35)
  • Summary (00:51)