Hello,
I'm pretty new to the WebAPI world.
So far I've read some great articles on how to create and call WebAPI; however, I'm still a bit puzzled about one thing: even if we create "just" a WebAPI, not a MVC application, we are almost "stuck" with theMicrosoft.AspNetCore.Mvc namespace.
For instance:
- ControllerBase is part of the namespace;
- HttpMethodAttribute (HttpGet, HttpPost, etc.) is part of the namespace;
- even return methods like Ok(), CreatedAtRoute(), etc. are part of the namespace.
Why is this like that? Can't we have a "proper" separation between "pure WebAPI" and MVC application? Is that the correct way of doing thing? If no, what is the correct way of creating a "pure WebAPI"?
Thanks and have a nice day :).