What is Class? And How to Create Class in ASP.NET MVC

--

In the MVC application, the model classes represent domain-specific data and business logic. A class represents the shape of the data as public properties.
All the model classes must be created in the Model folder.

Let’s create the model class that should have the required properties for the Category entity.

Steps: In the MVC application in Visual Studio, right-click on the Model folder, select Add → click on Class → Give name as Category and Click Add

Select Class

Let’s add some Properties to the Model class.

Let’s assume we need to store data CategoryId, CategoryName, CreatedDate, and CategoryOrder. It can create like this.

--

--

No responses yet