This video is available to students only

Adding Course Model to our Project

In this lesson, we'll add a course model to our project

Adding course model to our project#

In the weatherForecast controller, we saw a few properties such as Temperature, date and summary. In this lesson, we will create our own properties. When you go to an e-learning application, which properties do you see in a course? There is an image, name of the course, the price, duration, name of the instructor and rating. Let's implement these properties first.

Right click on the Entity folder and you will see an option to create a new class. You are able to see this because of the C# Extension we installed. Right click, then click on create a new class, and give this file a name of Course because this is our course modal. As you can see, namespace is Entity because it's the name of our project. Underneath that is the public class Entity. Now we can start writing our properties.

Start a new discussion. All notification go to the author.