Example #1
0
        public OperationResultVo GameUnfollow(Guid currentUserId, Guid gameId)
        {
            try
            {
                if (currentUserId == Guid.Empty)
                {
                    return(new OperationResultVo("You must be logged in to unfollow a game"));
                }

                gameDomainService.Unfollow(currentUserId, gameId);

                unitOfWork.Commit();

                int newCount = gameDomainService.CountFollowers(gameId);

                return(new OperationResultVo <int>(newCount));
            }
            catch (Exception ex)
            {
                return(new OperationResultVo(ex.Message));
            }
        }