Beispiel #1
0
        public void SubmitLike(PcBuild build, string userId)
        {
            bool?likeStatus = _context.CheckLikeStatus(build.Id, userId);

            if (likeStatus == true)
            {
                _context.RemoveLike(build, userId);
            }
            else
            {
                if (likeStatus == false)
                {
                    _context.RemoveDislike(build, userId);
                }

                _context.AddLike(build, userId);
            }
        }
Beispiel #2
0
 public void AddLike(PcBuild build, string userId) => _likeContext.AddLike(build, userId);