EventFlow have avery limited example on how to configure on dotnetcore which is based on dotnet core 1 and things changed a little but in dotnet core 2
Is there a way to use EventFlow configuration without Autofac?
There is discussion about here and the last comments are about the same thing I am asking here but no answers
https://github.com/eventflow/EventFlow/issues/158
basically I want to find a way to use the build in DI with doing some thing like
services.AddEventFlowOptions.New...
or
var resolver = EventFlowOptions.New.UseDotnetCoreServices(services)...
or ... anything else that you guys used?
I used this and it is working fine. What it looks like is that you pass in services into EventFlow's IoC AuotFac and it wraps around that.
As you can see you use the known ASP.NET Core API as usual, you Inject the same way without change in your Contollers, etc.
The only thing I changed was
void ConfigureServices
toIServiceProvider ConfigureServices
- I am not sure if that actually impacts anything but it works.You will need these packages
In
Startup.cs
and you need to use some MiddleWare provided by the package