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)); }
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); }
public bool Delete(int entityID) { Comment comment = _commentDAL.Get(a => a.CommentID == entityID); return(_commentDAL.Delete(comment) > 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); }