public JsonResult DeleteRestaurantReview(int parameter) { try { _restaurantReviewTask.RemoveRestaurantReview(parameter); return(Json(new { status = ActionStatus.Successful })); } catch (Exception exception) { return(Json(new { status = ActionStatus.Failed, data = exception.Message })); } }
public HttpResponseMessage DeleteRestaurantReview(int restaurantReviewId) { var response = new HttpResponseMessage(); try { _restaurantReviewTask.RemoveRestaurantReview(restaurantReviewId); response.StatusCode = HttpStatusCode.OK; } catch { response.StatusCode = HttpStatusCode.ExpectationFailed; } return(response); }