MVC UI with web API in one application?

I found a schema here: but i still get stuck in how to impliment it.

My app have two parts communicate each other. One is MVC UI like a CRUD application show to visitor. One is API provide to others apps. do you guys have any suggest idea or is there any example?

Your API endpoint doesn't have to be separate from your CRUD application. You can just make a route in your application that outputs content as expected by the API.

For example, you can have these routes for your ordinary application (I don't know what your application does, so this is just an example)


Those would all trigger the appropriate controller, do some work, then output an HTML page. You can simply add a route for your API calls:


These would all trigger a controller and do some work, but they don't have to output HTML - the can output JSON or XML, or whatever you have specificed for your API.