Exemple #1
0
 public IActionResult  GetAllProduct()
 {
     try
     {
         return(Ok(repository.GetProduct()));
     }
     catch (Exception ex)
     {
         logger.LogError($"There is an issue at {ex.Message},{ex}");
         return(BadRequest("Failed to get product"));
     }
 }
        public IActionResult Index()
        {
            var data = dutchContext.GetProduct();

            return(View());
        }