Explain Best practices while using ASP.Net MVC

Explain Best practices while using ASP.Net MVC

Best practices

  • Create a separate assembly for MODEL in case of large and complex code to avoid any unwanted situation.
  • The model should include business logic, session maintenance, validation part, and data logic part.
  • VIEW should not contain any business logic and session maintenance, use ViewData to access data in View
  • Business logic and data access should never occur in ControllerViewData
  • The controller should only be responsible for preparing and return a view, calling model, redirect to action, etc.
  • Use only specific view engine to create HTML markup from your view as it is the combination of HTML and the programming code.

Related Post

About Us

Community of IT Professionals

A Complete IT knowledgebase for any kind of Software Language, Development, Programming, Coding, Designing, Networking, Hardware and Digital Marketing.