public IDataResult <List <Shipper> > GetAllAsync(Expression <Func <Shipper, bool> > filter = null) { var _getAllAsync = _shipperDal.GetAllAsync(filter).Result; if (_getAllAsync == null) { return(new ErrorDataResult <List <Shipper> >(ShipperMessages.RecordNotFound)); } return(new SuccessDataResult <List <Shipper> >(_getAllAsync, ShipperMessages.ShippersListed)); }
public async Task <List <Shipper> > GetAllAsync(Expression <Func <Shipper, bool> > filter = null) { var cancelToken = new CancellationTokenSource(); return(await _shipperDal.GetAllAsync(cancelToken.Token, filter)); }