Where to write Database and Business logic in MVC?

后端 未结 4 1541
遥遥无期
遥遥无期 2021-01-01 20:37

As I am learning and working on Asp.Net MVC application, I want to know that what is the better place to write Business Logic and Data Access logic

4条回答
  •  萌比男神i
    2021-01-01 21:28

    Business logic should be in the Model.

    Data Access can either be its own later your Controllers call, or automated in an ORM that your Controller will call through repositories.

    A walk-through covering this can be found in Nerd Dinner, look for the free download section.

提交回复
热议问题