예제 #1
0
 public ActionResult Get()
 {
     try
     {
         return(Ok(Rep.GetAllProducts()));
     }
     catch (Exception ex)
     {
         Log.LogError($"Failed to retrive products:{ex}");
         return(BadRequest("Failed to retrieve products"));
     }
 }