Exemplo n.º 1
0
        public bool UpdateUserInfo(int id, string username, string email)
        {
            if (
                id == 0 ||
                string.IsNullOrEmpty(username) ||
                string.IsNullOrEmpty(email))
            {
                return(false);
            }

            if (_userQueries.DoesUserNameExist(id, username))
            {
                return(false);
            }

            if (_userQueries.DoesEmailExist(id, email))
            {
                return(false);
            }

            _userCommands.UpdateUserInfo(id, username, email);
            return(true);
        }