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" })); } }
public IHttpActionResult Delete(int MovieID) { return(Ok <bool>(_MoviesReposotory.DeleteMovie(MovieID))); }