From the course: ASP.NET MVC: HTTP Request Life Cycle
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Challenge: Adding a new course
From the course: ASP.NET MVC: HTTP Request Life Cycle
Challenge: Adding a new course
(energetic music) - [Instructor] For this challenge, we'll introduce a new feature to the RouxAcademy site, the ability to add new courses. We'll need a course view model that includes the name and description of the course. The name and description are required in order to add a new course. We'll need a view to enter the course information. When we submit the form, it should invoke an action method through HttpPost and use model binding to bind to the course view model. Our action can simply return a message that the course was created. I've added a few things to the exercise files to get you started, like a course controller. This challenge should take you about 10 minutes to complete. Be sure to check out the solution video when you're finished and good luck.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Introduction to action invocation2m 46s
-
Understand action method selection3m 10s
-
Work with action selector attributes6m 31s
-
Apply authentication and authorization filters3m 59s
-
Explore the model binding feature5m 11s
-
Action execution with action filters2m 40s
-
Implement a custom action filter7m 15s
-
Challenge: Adding a new course1m 1s
-
Solution: Adding a new course4m 35s
-
-
-