Example #1
0
        public static bool getChatLog(string username, out UserChatLog user)
        {
            UserChatLog loginAttempt = (UserChatLog)userChatLogColl.FindOne(x => x.username == username);

            user = loginAttempt;
            if (loginAttempt == null)
            {
                return(false);
            }
            return(true);
        }
Example #2
0
        public static void updateChatLog(UserChatLog update)
        {
            UserChatLog loginAttempt = userChatLogColl.FindOne(x => x.username == update.username);

            if (loginAttempt == null)
            {
                userChatLogColl.Insert(update);
            }
            else
            {
                userChatLogColl.Update(update);
            }
        }