示例#1
0
 public ActionResult DeleteProducten(int id)
 {
     try
     {
         Repo.DeleteProduct(id);
         return(Ok());
     }
     catch (Exception e)
     {
         if (e is InvalidOperationException)
         {
             return(NotFound());
         }
         else
         {
             return(StatusCode(StatusCodes.Status500InternalServerError));
         }
     }
 }