예제 #1
0
        public IResult DeleteComment(Guid commentId)
        {
            var comment = _commentDAL.Get(f => f.ID == commentId);

            if (comment != null)
            {
                _commentDAL.Remove(comment);
                return(new SuccessResult(Messages.DeleteComment));
            }
            return(new ErrorResult());
        }
 public Comment Get(int entityID)
 {
     return(_dal.Get(a => a.CommentID == entityID));
 }
예제 #3
0
 public IDataResult <Comment> Get(int id)
 {
     return(new SuccessDataResult <Comment>(commentDAL.Get(a => a.ID == id)));
 }
        public bool Delete(int modelID)
        {
            Comment comment = _commentDAL.Get(a => a.ID == modelID);

            return(_commentDAL.Delete(comment) > 0);
        }
예제 #5
0
        public bool Delete(int entityID)
        {
            Comment comment = _commentDAL.Get(a => a.CommentID == entityID);

            return(_commentDAL.Delete(comment) > 0);
        }
예제 #6
0
 public Comment Get(int entityID)
 {
     return(_commentDAL.Get(a => a.ID == entityID));
 }
예제 #7
0
        public void DeleteById(int entityID)
        {
            Comment cmt = _commentDAL.Get(a => a.ID == entityID);

            _commentDAL.Delete(cmt);
        }