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