Exemple #1
0
 public IActionResult Index()
 {
     try
     {
         return(StatusCode(200, api.GetAllProducts()));
     }
     catch (Exception e)
     {
         return(StatusCode(400, e.Message));
     }
 }
Exemple #2
0
 public IActionResult Index()
 {
     return(View(api.GetAllProducts()));
 }