Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • I think my biggest question is, why does the MVC application need to use the same classes as the web API? Why isn't the MVC application delegating to the API for those operations? Commented Nov 2, 2022 at 13:14
  • @GregBurghardt: isn't that overkill, since I can call the services/classes directly in my controller? Commented Nov 2, 2022 at 13:18
  • If you aren't calling the web API from the MVC app, why does the web API even exist? You are introducing coupling between applications if the MVC app is directly using classes from the web API. Commented Nov 2, 2022 at 14:12
  • @GregBurghardt: Some websites offer an API endpoint that mirrors what you can do on the site itself. You'd only reuse the Web API if the website was a client-side SPA (or similar), as opposed to a server-side rendered MVC application. Furthermore, you'd likely want to be able to scale your MVC app and your Web API differently, which is why you'd split them into two separate projects. Commented Jan 12, 2024 at 3:39