Ejemplo n.º 1
0
        public IActionResult GetAllProducts(int?groupId, string key)
        {
            _logger.LogInfo(key, LogEvents.ListItems, $"Attempt to get products list.");
            ProductListResponse productResponse = _productFacade.GetAllProduct(key, groupId);

            //throw new ApplicationException("Error");
            _logger.LogInfo(key, LogEvents.ListItems, $"{ productResponse.Products.Count} products was/were fetched successfully.");
            return(Ok(productResponse));
        }