public IDataResult <List <Product> > GetAllAsync(Expression <Func <Product, bool> > filter = null) { var _getAllAsync = _productDal.GetAllAsync(filter).Result; if (_getAllAsync == null) { return(new ErrorDataResult <List <Product> >(ProductMessages.RecordNotFound)); } return(new SuccessDataResult <List <Product> >(_getAllAsync, ProductMessages.ProductsListed)); }
public async Task <List <Product> > GetAllAsync() { return(await Task.Run(() => { Console.WriteLine($"Async Thread : {System.Threading.Thread.CurrentThread.ManagedThreadId}"); return _productDal.GetAllAsync(); })); }
public async Task <List <Product> > GetAllByActiveAsync() { return(await _productDal.GetAllAsync(x => x.IsDelete == true && x.IsActive == true, x => x.Id)); }
public async Task <List <Product> > GetAllAsync() { return(await _appProductDal.GetAllAsync()); }
public async Task <List <Product> > GetAllAsync(Expression <Func <Product, bool> > filter = null) { var cancelToken = new CancellationTokenSource(); return(await _productDal.GetAllAsync(cancelToken.Token, filter)); }
public Task <List <Product> > GetAllAsync() { return(_productDal.GetAllAsync()); }
public async Task <IDataResult <List <Product> > > GetAll() { return(new SuccessDataResult <List <Product> >(await _productDal.GetAllAsync())); }
public async Task <IDataResult <List <Product> > > GetAllProductsAsync() { var data = await _productDal.GetAllAsync(); return(new SuccessDataResult <List <Product> >(data.ToList())); }