Ejemplo n.º 1
0
        public async Task <IActionResult> GetAllProduct()
        {
            try
            {
                var categories = await _ProductRepositories1.GetProduct();

                if (categories == null)
                {
                    return(NotFound());
                }
                _logger.LogInformation("Data Retuen sucessfully");
                return(Ok(categories));
            }
            catch (Exception ex)
            {
                _logger.LogInformation(ex.Message);
                return(BadRequest());
            }
        }