Jun 19, 2018 06:02 PM|DA924|LINK
You can use Ajax on the client-side to call a WebAPI. You can also call a WebAPI in MVC code in an async manner too. You can also use Ajax to call a MVC controller action method.
Since you're new to MVC, you should keep this in mind, becuase after all, it's called Model View Controller and not VVC Viewbag View Controller, and you don't want to fall down the viewbag rabbit hole.
An MVC model contains all of your application logic that is not contained in a view or a controller. The model should contain all of your application business logic, validation logic, and database access logic. For example, if you are using the Microsoft
Entity Framework to access your database, then you would create your Entity Framework classes (your .edmx file) in the Models folder.
A view should contain only logic related to generating the user interface. A controller should only contain the bare minimum of logic required to return the right view or redirect the user to another action (flow control). Everything else should be contained
in the model.
In general, you should strive for fat models and skinny controllers. Your controller methods should contain only a few lines of code. If a controller action gets too fat, then you should consider moving the logic out to a new class in the Models folder.