Today, communication between applications, mobile and / or other devices is growing.
.NET provides Asp.net MVC
and Asp.net WebAPI
(to date, stable version).
Commonly Asp.net MVC
returns Views
, although WebApi
also returns is not correct. The most correct way to use an API would be data only ( json
)
So how do I avoid duplicating Controllers
in cases where I also need to communicate with mobile
and aplicação web
? Knowing that both methods will have CRUD(Create/Read/Update/Delete)
implemented
I know that Single Page Application(SPA)
is an option to reuse the same Controller Api, but what if we are not using SPA
?