Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

求助:我想前后台的接口分开。怎么单独引用order模块呢?非常感谢。 #286

Open
jonyama opened this issue Aug 18, 2024 · 1 comment

Comments

@jonyama
Copy link

jonyama commented Aug 18, 2024

或者说, OrderController和IOrderAppService的注册在什么地方呢?使用autofac官方的人工注入方法,还有abp的注册方式,都没有解决这个问题。

var builder = new ContainerBuilder();
// builder.RegisterType()
// .As();
builder.RegisterType()
.As();

    // context.Services.AddScoped<IOrderAppService>(
    //     sp => sp.GetRequiredService<OrderAppService>()
    // );
    // context.Services.AddScoped<IOrderAppService>(
    //     sp => sp.GetRequiredService<OrderController>()
    // );

---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'EasyAbp.EShop.Orders.Orders.OrderController' can be invoked with the available services and parameters:
Cannot resolve parameter 'EasyAbp.EShop.Orders.Orders.IOrderAppService service' of constructor 'Void .ctor(EasyAbp.EShop.Orders.Orders.IOrderAppService)'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants