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