ASP MVC 5 Attribute routing VS. Convention-based routing

后端 未结 4 1146
不知归路
不知归路 2021-02-02 13:30

ASP MVC 5 has a new Routing called attribute routing. The way I see it, the routes are now scattered on every controller unlike with the convention-based that there is single lo

4条回答
  •  死守一世寂寞
    2021-02-02 13:53

    You can Unit Test your'e routes when using conventional routing, and you also have a "seperation of concerns".

    That cant be said about Attribute Routing.

    For a large project I would go with conventional, for a small project attribute routing is more than fine.

提交回复
热议问题