Multiple projects for Application Services in ASP.NET Boilerplate

故事扮演 提交于 2019-12-24 00:23:48

问题


I have an application with two projects that contain IApplicationService classes, but the framework only resolves client proxies (in JavaScript: abp.services.app.xxxx) by default for Application project that comes with base template.

myProject.Application => default ASP.NET Boilerplate
myProject.ExtraServices => my own (not generating client proxies)

Thanks.


回答1:


ASP.NET Core

Create controllers for your ExtraServices project in MyProjectWebCoreModule:

Configuration.Modules.AbpAspNetCore()
    .CreateControllersForAppServices(
        typeof(ExtraServicesModule).GetAssembly()
    );

ASP.NET MVC 5

Create controllers for your ExtraServices project in MyProjectWebApiModule:

Configuration.Modules.AbpWebApi().DynamicApiControllerBuilder
    .ForAll<IApplicationService>(typeof(ExtraServicesModule).Assembly, "app")
    .Build();


来源:https://stackoverflow.com/questions/47300026/multiple-projects-for-application-services-in-asp-net-boilerplate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!