示例#1
0
        public HttpResponseMessage GetStats()
        {
            Playground.Model.ViewModel.PlaygroundStats res = new Model.ViewModel.PlaygroundStats()
            {
                TotalPlaygrounds = playgroundBusiness.TotalPlaygroundsCound(),
                TotalGames       = gameBusiness.TotalGamesCount(),
                TotalUsers       = userBusiness.TotalUsersCount(),
                TotalPlayers     = competitorBusiness.TotalCompetitorsCount(),
                TotalMatches     = matchBusiness.TotalMatchesByStatus(MatchStatus.Confirmed)
            };


            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, res);

            return(response);
        }