Example #1
0
    public virtual async Task <RatingDto> CreateAsync(string entityType, string entityId,
                                                      CreateUpdateRatingInput input)
    {
        var userId = CurrentUser.GetId();
        var user   = await CmsUserLookupService.GetByIdAsync(userId);

        var rating = await RatingManager.SetStarAsync(user, entityType, entityId, input.StarCount);

        return(ObjectMapper.Map <Rating, RatingDto>(rating));
    }
Example #2
0
 public virtual async Task <RatingDto> CreateAsync(string entityType, string entityId, CreateUpdateRatingInput input)
 {
     return(await RequestAsync <RatingDto>(nameof(CreateAsync), new ClientProxyRequestTypeValue
     {
         { typeof(string), entityType },
         { typeof(string), entityId },
         { typeof(CreateUpdateRatingInput), input }
     }));
 }
Example #3
0
 public virtual Task <RatingDto> CreateAsync(string entityType, string entityId, CreateUpdateRatingInput input)
 {
     return(RatingPublicAppService.CreateAsync(entityType, entityId, input));
 }