[英]Design a CMS site using ASP.NET MVC 5
I'm building a site which mainly has articles and I'm using ASP.NET MVC 5 framework. 我正在构建一个主要包含文章的网站,并且正在使用ASP.NET MVC 5框架。 I want to have an admin page where I can add, edit these article content.
我想要一个管理页面,可以在其中添加,编辑这些文章内容。
I'm having a problem with designing the structure of this project. 我在设计该项目的结构时遇到问题。 I'm thinking of having a controller class called '
adminController
', where I handle all the requests related to content management. 我正在考虑使用一个名为“
adminController
”的控制器类,在其中处理与内容管理相关的所有请求。
Is that approach conceptually correct in ASP.NET MVC ? 在ASP.NET MVC中 ,该方法在概念上是否正确? Because If this was an ASP web forms project, I would simply have two different projects called Public and Admin in a single solution.
因为如果这是一个ASP Web窗体项目,那么我将在一个解决方案中仅拥有两个不同的项目,分别称为Public和Admin。
I'm quite new to ASP.NET MVC framework and I'd appreciate any help. 我是ASP.NET MVC框架的新手,希望能对您有所帮助。
You can do 2 separate projects and can do one. 您可以做2个单独的项目,也可以做一个。
Since ASP.NET MVC 4 whe have Areas
and i suggest you to use it if you want structure your project and separate admin logic from public. 由于ASP.NET MVC 4有
Areas
,因此我建议您使用它,如果您要结构化项目并将管理逻辑与公共分开。
Here is a tutorial that you can check that explain whar areas
is and how you can work with them. 这是一个教程 ,您可以检查并解释鲸鱼
areas
以及如何使用它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.