In this article we will learn about Data Model in ASP.NET MVC.
Models represents domain or business logic in MVC architecture. Model hold data in public properties.
Models represents domain or business logic in MVC architecture. Model hold data in public properties.
Adding a Model:
Open our MVC project. Right click on model folder - > Add - > click on Class.
In the Add New Item dialog box, enter class name "Employee and click Add button.
This will add new Employee class in model folder, Now add some public properties like id,name,age,address.
So this is the way you can create your model class.
Comments
Post a Comment