Exemple #1
0
        public IResult Delete(Like id)
        {
            var like = _likeDal.Get(like1 => like1.UserId == id.UserId && like1.PhotoId == id.PhotoId);

            if (like != null)
            {
                _likeDal.Delete(like);
            }
            return(new SuccessResult());
        }
Exemple #2
0
        public IResult Delete(int id)
        {
            IResult result = BusinessRule.Run
                             (
                CheckIfLikeAlreadyDeleted(id)
                             );

            if (result != null)
            {
                return(result);
            }

            var deleteToLike = _likeDal.Get(l => l.Id == id);

            _likeDal.Delete(deleteToLike);

            return(new SuccessResult());
        }
Exemple #3
0
        public void Delete(int likeId)
        {
            var entity = GetLikeById(likeId);

            _likeDal.Delete(entity);
        }