Ejemplo n.º 1
0
        public ActionResult GetByProductId([FromQuery] string id)
        {
            var apiRep = new APIResponse();
            var rate   = _rateService.GetByProductId(id);

            apiRep.Error = false;
            if (rate == null)
            {
                apiRep.Error = true;
                apiRep.Data  = null;
                return(Ok(apiRep));
            }
            apiRep.Error = false;
            apiRep.Data  = rate;

            return(Ok(apiRep));
        }