public UserModel GetOneUserByLogin(string userNickName, string userPassword)
        {
            if (userNickName.Equals(""))
            {
                throw new ArgumentOutOfRangeException();
            }
            if (userPassword.Equals(""))
            {
                throw new ArgumentOutOfRangeException();
            }

            if (!CheckStringFormat.IsBase64String(userPassword))
            {
                userPassword = ComputeHash.ComputeNewHash(userPassword);
            }
            DataTable dt        = new DataTable();
            UserModel userModel = new UserModel();

            using (MySqlCommand command = new MySqlCommand())
            {
                dt = GetMultipleQuery(UserStringsMySql.GetOneUserByLogin(userNickName, userPassword));
            }
            foreach (DataRow ms in dt.Rows)
            {
                userModel = UserModel.ToObject(ms);
            }

            return(userModel);
        }
        public UserModel GetOneUserByLogin(string userNickName, string userPassword)
        {
            if (!CheckStringFormat.IsBase64String(userPassword))
            {
                userPassword = ComputeHash.ComputeNewHash(userPassword);
            }

            return((from user in _users.AsQueryable()
                    where user.userNickName.Equals(userNickName)
                    where user.userPassword.Equals(userPassword)
                    select new UserModel
            {
                userID = user.userID,
                userFirstName = user.userFirstName,
                userLastName = user.userLastName,
                userNickName = user.userNickName,
                userPassword = user.userPassword,
                userEmail = user.userEmail,
                userGender = user.userGender,
                userBirthDate = user.userBirthDate,
                userPicture = user.userPicture != null ? "/assets/images/users/" + user.userPicture : null,
                userLevel = user.userLevel
            }).SingleOrDefault());
        }