public Statistic Get(int userId)
        {
            _ = new Statistic();

            Statistic statistic = _statisticRepository.Get(userId).ToClient();

            if (statistic is null)
            {
                throw new CommonException(CommonResult.NotFound, HttpStatusCode.NotFound, "User do not exist");
            }

            return(statistic);
        }
Example #2
0
        public ActionResult <IEnumerable <RaceVehicleStatistic> > Get()
        {
            var result = _statisticRepository.Get().ToList();

            return(result);
        }