0

I am new to ASP.NET CORE and interested in how MVC and WEB API could be combined together? For example is there any way to use WEB API for back-end and MVC for front-end? The application should be simple CRUD app.

2
  • 2
    You can use whatever you want at the same time. Usually with MVC you still have some Web APIs in the background. Commented Mar 5, 2021 at 16:09
  • @SamiKuhmonen Which should I create MVC or API project at start? Commented Mar 5, 2021 at 16:16

1 Answer 1

3

Easiest way is to create an MVC application.

Just create an api-controller inside and you have both!

A web api is just MVC, without the V, that is a model and a controller, no view.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.