In the below example, we will see how we can use model (Class/Entity) to the MVC application.
Step 1: Create Class file as Customer class to Model folder and add properties to that
Step 2: In controller, Index action method create customer object and add value to that object
Step 3: In Index view, bind model object to view as shown in the below code snippet
Source code
No comments:
Post a Comment