Open Closed

the priority of DI #947

dashu created

if i implement IAuditingStore as myAuditingStore, SimpleLogAuditingStore will be overridden by myAuditingStore why SimpleLogAuditingStore be overridden? how it implemented? does DI have priority ?

1 Answer(s)
  • 0
    ismcagdas created
    Support Team


    If you want "simpleLogAuditingStore will be overridden by myAuditingStore", you need to register myAuditingStore in your module's PreInitialize method. Abp registers dependencies in Initialize method of modules.

    In Castle Windsor, by default first regitered dependency wins unless you use "IsDefault()". I dont remember the scenario if you use "IsDefault()" more than once, but you can test it :)

    You can check it here <a class="postlink" href=""> ... registered</a>