Loading...
Area: Episerver Community API
Applies to versions: 1 and higher

Rating a target

Recommendations [hide]

In the Episerver Community API, a rating is represented with the Rating class.

An instance of the Rating class is constructed with

  • a reference to the user submitting the rating (represented by the Reference class)
  • a reference to the target being rated (represented by the Reference class)
  • a rating value (represented by the RatingValue class)

An instance of the Rating class can be constructed as shown below:

var rater = Reference.Create("user://identifier/for/a/user");
var target = Reference.Create("resource://identifier/for/a/resource");
var value = new RatingValue(5);

var rating = new Rating(rater, target, value);
Do you find this information helpful? Please log in to provide feedback.

Last updated: Nov 01, 2016

Recommendations [hide]