Is there any reason to use SignalR.Ninject if your MVC dependency resolver is already set to use ninject?
-
29-10-2019 - |
Pergunta
I'm just starting out with SignalR and I noticed it has a SignalR.Ninject plugin that allows you to override it's dependency resolver with a Ninject version. That's awesome, but I understood that by default SignalR uses the MVC dependency resolver and I already have that set to use Ninject via the Ninject.Web.Mvc assembly.
Does that mean I'm already using Ninject with SignalR or am I misunderstanding the way the SignalR dependency injection works?
Solução
Yes, they are 2 different dependency resolvers (as in 2 different types). SignalR doesn't depend on MVC's types. That said, you could have 1 type the implements both interfaces and use that container for both mvc and SignalR.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow