示例#1
0
        public IDataResult <List <Order> > GetAllAsync(Expression <Func <Order, bool> > filter = null)
        {
            var _getAllAsync = _orderDal.GetAllAsync(filter).Result;

            if (_getAllAsync == null)
            {
                return(new ErrorDataResult <List <Order> >(OrderMessages.RecordNotFound));
            }
            return(new SuccessDataResult <List <Order> >(_getAllAsync, OrderMessages.OrdersListed));
        }
 public async Task <IDataResult <List <Order> > > GetAll()
 {
     return(new SuccessDataResult <List <Order> >(await _orderDal.GetAllAsync()));
 }
        public async Task <List <Order> > GetAllAsync(Expression <Func <Order, bool> > filter = null)
        {
            var cancelToken = new CancellationTokenSource();

            return(await _orderDal.GetAllAsync(cancelToken.Token, filter));
        }