Esempio n. 1
0
        public bool UnlikePhoto(int photoId)
        {
            var like = this._context.Likes.FirstOrDefault(x => x.PhotoId == photoId && x.LikerId == _userSessionService.GetCurrentUserID());

            this._context.Likes.Remove(like);
            this._context.SaveChanges();
            return(DoesUserLikeThePhoto(this._userSessionService.GetCurrentUserID(), photoId));
        }