简体   繁体   中英

MVC Architecture in .Net6

Basically I want to follow MVC Architecture. So should I use Asp.Net Web Api or Asp.Net MVC for backend development?

Does Asp.Net Web Api have MVC architecture? If does help me build Web Api using MVC Architecture in .net 6.

Based on what you've written, you have a couple options.

MVC is a front-end design pattern. For backend development, you could create a Web API project, which would give you the ability to create models and controllers similar to MVC. You would not create views with Web API as there is no UI.

Alternatively, and especially if it's a smaller project where scalability is not a concern, you could create an MVC project representing the whole app and include the backend code there rather than creating a separate backend project. In this case you'd have models and controllers driving the UI, but not the backend.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM