You can use Scopes to manage child applications in the parent. Please follow the steps in the question below to create areas in your project.
How to configure scopes in ASP.NET MVC3
To process Api requests for regions, you need to have two routes in registering the region.
public override void RegisterArea(AreaRegistrationContext context)
{
context.Routes.MapHttpRoute(
name: "Area_Name_Api",
routeTemplate: "Area_Name/api/{controller}/{action}/{id}",
defaults: new { id = RouteParameter.Optional }
);
context.MapRoute(
"Area_Name_default",
"Area_Name/{controller}/{action}/{id}",
new { action = "Index", id = UrlParameter.Optional }
);
}
The first route is designed to reach the api controller in the area, and the second for the usual ones.
http://blogs.infosupport.com/asp-net-mvc-4-rc-getting-webapi-and-areas-to-play-nicely/
The link above explains more.
Thus, you can separate child applications and organize their functions, view models (if any) in the parent project.
source
share