public class DirectModeHub : Hub
{
private string _userId = null;
private string _sessionId = null;
// Public hub methods
public void RegisterICD(string userId, string SessionId)
{
_userId = userId;
_sessionId = SessionId;
var id = Context.ConnectionId;
var lastOn = DateTime.Now.ToString("dd-mm-yyyy hh:MM:ss");
using (SqlDbContext sqlDb = new SqlDbContext("SqlDbContext", null))
{
var user = (from u in sqlDb.UserSessions
where u.SessionId.ToString() == SessionId
select u).FirstOrDefault();
if (user.ConnectionId != id )
{
}
}
}
}
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE