public async Task <IList <ProductListDto> > Handle(GetProductsQueryModel request, CancellationToken cancellationToken) { var userType = contextAccessor.HttpContext.User.GetUserType(); var result = await cache.GetOrCreateAsync(CacheKey.ProductList, s => productQueryService.GetAsync(), userType); return(result); }
public async Task <ProductDto> Get(int id) { return(await _productQueryService.GetAsync(id)); }
public async Task <ProductDto> Get(int id) => await productQueryService.GetAsync(id);
public async Task <ActionResult <ProductDto> > Get(int id) { return(await productQueryService.GetAsync(id)); }
public async Task <ProductDto> Get(int id) { var result = await _productQueryService.GetAsync(id); return(result); }
public async Task <ProductDto> Handle(GetProductByIdQueryModel request, CancellationToken cancellationToken) => await productQueryService.GetAsync(request.Id);
public async Task <ProductDal> GetProduct([FromBody] int productId) { return(await _productQueryService.GetAsync(productId)); }