示例#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));
 }
        public void DeleteById(int entityID)
        {
            Comment cmt = _commentDAL.Get(a => a.ID == entityID);

            _commentDAL.Delete(cmt);
        }