コード例 #1
0
 public IActionResult DeleteMovie([FromQuery] String id)
 {
     try
     {
         _movies.DeleteMovie(id);
         return(new JsonResult(new { StatusCodeResult = "200", message = "Movie has been successfully deleted" }));
     }
     catch (Exception)
     {
         return(new JsonResult(new { StatusCodeResult = "500", message = "Server error" }));
     }
 }
コード例 #2
0
 public IHttpActionResult Delete(int MovieID)
 {
     return(Ok <bool>(_MoviesReposotory.DeleteMovie(MovieID)));
 }