Best location for Fluent IOC configuration/Modules (Currently trying Ninject)

前端 未结 4 1281
清歌不尽
清歌不尽 2021-01-05 16:37

I am struggling to find the best place to locate my Ninject configuration \"Modules\" (the place where Type bindings are specified). I hope I am just missing some obvious tr

4条回答
  •  天涯浪人
    2021-01-05 17:24

    I always put Ninject Modules Configuration into separate assembly like Acme.Common and reference to this from Acme.Data, Acme.Domain etc. so there is no circular dependencies, I can always replace Acme.Common after some modifications in registrations without troubles.

提交回复
热议问题