Join Jess Chadwick for an in-depth discussion in this video Increasing maintainability with dependency injection, part of ASP.NET Core: Razor Pages.
- [Voiceover] Now that I've shown you how…to use layouts to help separate the content…of individual pages from the overall site layout…and the page model approach to keep logic…out of your views, it's time to introduce…perhaps the most effective way to encourage…separation of concerns, and that is with…a pattern called dependency injection.…Put simply, dependency injection means…that a component's dependencies are provided to…or injected into it so the component doesn't…have to worry about choosing a specific implementation…or know how to create or configure an instance…of that dependency.…
To really understand that power of…dependency injection, and how it can help…simplify your code and encourage loose coupling,…I'll apply it to some of the code I have already written…to see what a difference it can make.…So far, I've already taken the first step…toward loose coupling in my application…by creating the RecipeService class…to hold all of the logic around…retrieving or editing recipes.…However, my pages have also been responsible…
- Creating a new application
- Setting up pages
- Rendering dynamic content
- Reusing markup with layouts
- Increasing the maintainability of pages
- Processing data
- Validating input
- Securing an application
Skill Level Intermediate
Deploying ASP.NET Core Applicationswith Nate Barbettini57m 57s Intermediate
Building Web APIs with ASP.NET Corewith Chris Woodruff1h 7m Intermediate
ASP.NET Core: Test-Driven Developmentwith Richard Rout37m 30s Intermediate
1. Razor Pages Intro
What is Razor Pages?3m 5s
2. Razor Pages Basics
3. Reusing Markup with Layouts
4. Building Maintainable Applications
5. Working with Data
6. Validating User Inputs and Securing Your Application from Unauthorized Users
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.