Chatjs: how to fetch friends list from sql database

403 Views Asked by At

I am using ChatJs in my asp.net webapplication with signalr adapter. How to show the online user from database on page load.As i am new to asp.net please guide me. thanks in advance

/// <summary>
    /// This method is STUB. This will SIMULATE a database of users
    /// </summary>
    private static readonly List<DbUserStub> dbUsersStub = new List<DbUserStub>();
// <summary>
    /// This method is STUB. In a normal situation, the user info would come from the database so this method wouldn't be necessary.
    /// It's only necessary because this class is simulating the database
    /// </summary>
    /// <param name="newUser"></param>
    public static void RegisterNewUser(DbUserStub newUser)
    {
        if (newUser == null) throw new ArgumentNullException("newUser");
        dbUsersStub.Add(newUser);
    }
0

There are 0 best solutions below