ASP.NET MVC How many levels deep should a view or URL be?

前端 未结 3 1802
轻奢々
轻奢々 2021-02-09 09:46

I am still learning ASP.NET MVC. With webforms, I would create a new folder let\'s call it admin. In there I might have many pages for create_product, edit_product, etc. So t

3条回答
  •  抹茶落季
    2021-02-09 10:21

    For admin stuff, just mark with [Authorize] attribute. To ensure only admins can use it, do something like [Authorize(Roles = "Admin")]. Check out this question

    Also, /product/create is most common, I think :)

提交回复
热议问题