2
Crost
4y

Dear .Net developers.

I wrote this tonight:
https://github.com/Future-Forward-S...

Please let me know if I am extremely clever, or extremely stupid.

P.s. I know it's not exactly ports and adapters. Rename needed maybe.

Comments
  • 1
    So. What does it do exactly?
  • 2
    @Ranchonyx it ensures that if you have a project with interfaces, and those interfaces are used in that project as dependencies BUT not implemented there, you can still ensure they're implemented properly.

    Eg
    Domain project has repository interfaces
    Infrastructure project actually adds them as services and has the concretes

    From the domain project you can still make sure they're singletons. And you can make sure it fails at startup rather than runtime if they're not registered at all.
  • 1
    Seems like you just have to "remember" to set something up further down the stack than before.

    Also, I don't think the domain layer should dictate the scope when it doesn't know the implementation.
  • 0
    @spongessuck good point!
Add Comment