Register my service to SignalR hub

16 views
Skip to first unread message

shali...@gmail.com

unread,
Nov 26, 2017, 4:11:39 PM11/26/17
to Autofac
Hello, I have a question in StackOverFlow but nobody helped me yet.

I use this tutorial: http://autofaccn.readthedocs.io/en/latest/integration/signalr.html

for injecting my services.

I use the OWIN section and everything was ok when I injected the ILifetimeScope:
public AdminHub(ILifetimeScope lifetimeScope)
{
_hubLifetimeScope = lifetimeScope.BeginLifetimeScope();
}

But I don't need this object to inject, I want to inject some service for using my db to update connection and more parameters.

public AdminHub(IUserService userService)
{
_userService = userService;
}

How to register the UserService, I tried everything but I didn't success.

Travis Illig

unread,
Nov 27, 2017, 11:23:36 AM11/27/17
to Autofac
You should post a link to your question so people can answer there instead of duplicating and posting in both places.

Also, keep in mind this past weekend was Thanksgiving in the US so a lot of people have been on holiday since November 23. You'll have to be patient.
Reply all
Reply to author
Forward
0 new messages