Exemplo n.º 1
0
        public bool EditReputationUser(Guid idUser, string action)
        {
            try
            {
                User user       = GetUserByID(idUser);
                int  reputation = user.Reputation;

                if (action == "+")
                {
                    reputation++;
                }
                else if (action == "-")
                {
                    reputation--;
                }
                user.Reputation = reputation;
                _usersDAL.EditUser(user);
                return(true);
            }
            catch
            {
                return(false);
            }
        }