Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discussion] UseSignalR and UseConnections are marked obsolete #10754

Open
BrennanConroy opened this issue Jun 3, 2019 · 2 comments

Comments

@BrennanConroy
Copy link
Member

commented Jun 3, 2019

The methods UseConnections and UseSignalR, and the classes ConnectionsRouteBuilder and HubRouteBuilder are being marked obsolete in 3.0. And will be removed in the next major release after that.

The preferred method for using SignalR starting in 3.0 is to use Endpoint Routing. See example below.

Old code:

app.UseSignalR(routes =>
{
    routes.MapHub<SomeHub>("/path");
});

New code:

app.UseEndpoints(endpoints =>
{
    endpoints.MapHub<SomeHub>("/path");
});

This is the discussion issue for aspnet/Announcements#362.

@VictorioBerra

This comment has been minimized.

Copy link
Contributor

commented Jun 4, 2019

I haven't looked at the code yet, sorry if this is a dumb question. So UseEndpoints is a core thing (in a non-SigR namespace) and MapHub is a SignalR extension method for creating a new endpoint and mapping a hub to it?

@Kahbazi

This comment has been minimized.

Copy link
Contributor

commented Jun 4, 2019

@VictorioBerra yes, there's also MapController extension method for mvc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.