public async Task <ActionResult <MemoryStream> > ExportExcel([FromQuery] ProductsQueryResource query) { var productsQuery = _mapper.Map <ProductsQueryResource, ProductsQuery>(query); var exportResult = await _productService.ExportExcel(productsQuery); return(File(exportResult.Resource, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "products-catalog.xlsx")); }
public async Task <QueryResultResource <ProductResource> > ListAsync([FromQuery] ProductsQueryResource query) { var productsQuery = _mapper.Map <ProductsQueryResource, ProductsQuery>(query); var queryResult = await _productService.ListAsync(productsQuery); var resource = _mapper.Map <QueryResult <Product>, QueryResultResource <ProductResource> >(queryResult); return(resource); }
public ActionResult ListAsync([FromQuery] ProductsQueryResource query) { return(Ok("2.0")); }