Beispiel #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()));
        }
Beispiel #2
0
 public List <Comment> GetAll()
 {
     return(_commentDal.GetAll());
 }
 public async Task <ActionResult <IEnumerable <Comment> > > GetComments()
 {
     return(await _commentDal.GetAll());
 }
Beispiel #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()));
 }
 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));
 }
Beispiel #8
0
 public IDataResult <List <Comment> > GetByPostId(int postId)
 {
     return(new SuccessDataResult <List <Comment> >(_commentDal.GetAll(p => p.PostId == postId)));
 }