public IDataResult <List <Supplier> > GetAllAsync(Expression <Func <Supplier, bool> > filter = null)
        {
            var _getAllAsync = _supplierDal.GetAllAsync(filter).Result;

            if (_getAllAsync == null)
            {
                return(new ErrorDataResult <List <Supplier> >(SupplierMessages.RecordNotFound));
            }
            return(new SuccessDataResult <List <Supplier> >(_getAllAsync, SupplierMessages.SuppliersListed));
        }
        public async Task <List <Supplier> > GetAllAsync(Expression <Func <Supplier, bool> > filter = null)
        {
            var cancelToken = new CancellationTokenSource();

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