Using Autofac with Domain Events

后端 未结 2 1494
粉色の甜心
粉色の甜心 2021-01-31 00:17

I\'m trying to introduce domain events into a project. The concept is described in Udi Dahan\'s post - http://www.udidahan.com/2009/06/14/domain-events-salvation/

Here\'

2条回答
  •  走了就别回头了
    2021-01-31 00:42

    As Peter pointed out, the registration problem was with your Where() clause.

    When scanning assemblies Autofac filters components automatically based on the services you specify, so it would be equally correct to just use:

    builder.RegisterAssemblyTypes(asm)
        .AsClosedTypesOf(handlerType)
        .InstancePerLifetimeScope();
    

提交回复
热议问题