public ActionResult GetAverage(string productId) { var apiRep = new APIResponse(); var average = _rateService.Average(productId); apiRep.Error = false; apiRep.Error = false; apiRep.Data = new { average }; return(Ok(apiRep)); }