-3

I want to create a website / web application with .NET Core in the backend and Angular as frontend. I am still in the planning phase and one thing I don't come to understand is if one would use ASP.NET Core or ASP.NET Core MVC in the backend. Which one of them is typically used any why?

The reason I am asking this is that to my knowledge I don't use MVC with Angular (but instead I use MVVM). Therefore I would assume I don't need ASP.NET CORE MVC, but there are books like Essential Angular for ASP.NET Core MVC (emphasis on MVC), so I am wondering how that all fits together.

stefan.at.wpf
  • 13,061
  • 31
  • 116
  • 199
  • you should create web API use ASP.NET Core, and use API in angular using HttpClient https://docs.microsoft.com/en-us/aspnet/core/web-api/?view=aspnetcore-2.2 – Hien Nguyen May 05 '19 at 15:30
  • Thanks. Do you know why there are books with MVC in the title? Does this maybe have historic reasons? – stefan.at.wpf May 05 '19 at 15:35
  • 3
    Questions like this is off topic at SO. That said, here's a good read how MVC compare to MVVM: https://stackoverflow.com/questions/667781/what-is-the-difference-between-mvc-and-mvvm – Ason May 05 '19 at 15:35
  • They combine MVC and angular it same with you can combine MVC and Web API in one solution – Hien Nguyen May 05 '19 at 15:39

1 Answers1

-1

So, I think I figured it out. The way to go is to create a Web API and then use the HttpClient in Angular (as commented by Hien). Documentation e.g. at https://docs.microsoft.com/en-us/aspnet/core/web-api/?view=aspnetcore-2.2 shows that while creating the Web API some things are borrowed from the ASP.NET Core MVC namespaces. Guess that's there the MVC is coming from. Parts from it are used, just not the complete thing.

stefan.at.wpf
  • 13,061
  • 31
  • 116
  • 199