From the course: Learning ASP.NET

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Course reviews

Solution: Course reviews

From the course: Learning ASP.NET

Start my 1-month free trial

Solution: Course reviews

(upbeat music) - [Instructor] Let's take a look at the solution to our challenge together. The first thing we'll do is add a course review model class And let's start off with an int ID property. And then a string for course name. Since it's required, I'm going to add a required attribute and I'll use quick actions to add the data annotations namespace. Let's also add a display attribute with a name of course name. This will help us later to create the display labels in the view. Next is the review comments string property with another required attribute. And for the display, the name can be review comments. The last property is going to be a Boolean is recommended. And for the display, I'll make it a little more descriptive. Do you recommend this course? And let's move along to the course controller where we'll be making a few updates We'll need a new HTTP get action that returns our new view.…

Contents