public IActionResult ResturantRating([FromQuery] RestaurantRating restaurantRating) { if (!ModelState.IsValid) { return(this.BadRequest()); } business_Repo.RestaurantRating(restaurantRating); return(this.Ok("Submitted the reviewes")); }
public IActionResult ResturantRating([FromBody] RestaurantRating restaurantRating) { if (!ModelState.IsValid) { return(this.BadRequest()); } if (business_Repo.RestaurantRating(restaurantRating)) { return(this.Ok("Submitted the reviewes")); } else { return(this.StatusCode((int)HttpStatusCode.InternalServerError, "Unable to process request.")); } }