示例#1
0
        public IDataResult <List <Comment> > GetAll()
        {
            IResult result = BusinessRule.Run
                             (
                CheckIfCommentsExist()
                             );

            if (result != null)
            {
                return(new ErrorDataResult <List <Comment> >(result.Message));
            }

            return(new SuccessDataResult <List <Comment> >(_commentDal.GetAll()));
        }
示例#2
0
 public List <Comment> GetAll()
 {
     return(_commentDal.GetAll());
 }
 public async Task <ActionResult <IEnumerable <Comment> > > GetComments()
 {
     return(await _commentDal.GetAll());
 }
示例#4
0
 public IDataResult <List <Comment> > GetAll()
 {
     return(new SuccessDataResult <List <Comment> >(_commentDal.GetAll(), Messages.CommentsListed));
 }
 public IDataResult <List <Comment> > GetAll()
 {
     return(new SuccessDataResult <List <Comment> >(_commentDal.GetAll()));
 }
示例#6
0
 public List <Comment> GetAll(Expression <Func <Comment, bool> > expression = null)
 {
     return(commentDal.GetAll(expression));
 }
 public List <Comment> GetAll(Expression <Func <Comment, bool> > filter = null)
 {
     return(commentDal.GetAll(filter));
 }
示例#8
0
 public IDataResult <List <Comment> > GetByPostId(int postId)
 {
     return(new SuccessDataResult <List <Comment> >(_commentDal.GetAll(p => p.PostId == postId)));
 }