public ActionResult GetRating(int gossipId) { var ratingService = new RatingService(); var ratingType = ratingService.getRating(gossipId); var ratingJson = new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(ratingType); return Json(ratingJson, JsonRequestBehavior.AllowGet); }
public ActionResult AddRating(Rating rating) { var ratingService = new RatingService(); ratingService.AddOrChangeRating(rating.gossipId, rating.RatingType); return Json(new { success = true }); }