问题
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