Can an asp.net mvc application also have a web service?

前端 未结 6 1424
你的背包
你的背包 2021-02-09 06:42

I have an asp.net mvc application and now I need to add a web service to go along with it. What is the best solution for this? Just create a new web service project and add it

6条回答
  •  时光说笑
    2021-02-09 07:32

    Unless your application is very small I would recommend you create different projects for each logical part of the application. A good staring point is having a project for each of these:

    • Domain objects
    • Data access
    • Web Services
    • UI (your ASP.NET MVC app)

    This provides a clean separation corresponding to your architecture and supports reuse.

提交回复
热议问题