How do I keep objects in switching between views in Asp.net MVC .net 5.0 (C#)?

I have an object that keeps the connection to a websocket, only that I have 4 views that have to read this connection, in the home that keeps the connection at a refresh, but if I switch from one view to another it doesn’t keep, how can I solve? how is it possible to keep the object?

Thanks in advance

P.S.: I tried to create a basic controller, but it does not keep the object that must maintain the connection in the service in the passage to view

Source: Windows Questions

LEAVE A COMMENT