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); }
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); } }