revoframework / Revo

Event Sourcing, CQRS and DDD framework for C#/.NET Core.
https://docs.revoframework.net/
MIT License
644 stars 70 forks source link

[Question] How can i to add service from IServiceCollection to kernal ? #39

Closed RustamGulamov closed 3 years ago

RustamGulamov commented 3 years ago

I registred service by DI container asp.net core. ( services.AddScoped<IMyType, MyType>() ). I added this type to the ctor EFCoreEntityEventToPocoProjector. But the kernel is throwing an exception. how can you solve? Is it possible to solve this problem without binding (IMyType, MyType) to NinjectModule ?

@martinzima . Please help

martinzima commented 3 years ago

In general, any DI bindings for your application parts should be registered in NinjectModules, the ASP.NET Core DI mechanism is useful only for ASP.NET Core-related stuff. For more info, please see .