Beispiel #1
0
        public async Task <HttpResponseMessage> LoadData()
        {
            return(await Task <HttpResponseMessage> .Factory.StartNew(() =>
            {
                songsTotalModel.OrderBy = "ArtistName";
                songsTotalModel.GetMostVotedThisMonth(0, 5);

                albumsTotalModel.OrderBy = "ArtistName";
                albumsTotalModel.GetMostVotedAlbumThisMonth(0, 5);

                var retorno = new
                {
                    gendersTotalModel = this.gendersTotalModel.GetTotals(),
                    userAgesTotalModel = this.userAgesTotalModel.GetTotals(),
                    activityByHourModel = this.activityByHourModel.GetTotals(),
                    songsTotalModel = this.songsTotalModel,
                    albumsTotalModel = this.albumsTotalModel
                };

                return Request.CreateResponse <object>(HttpStatusCode.OK, retorno);
            }));
        }
        public async Task <HttpResponseMessage> LoadData()
        {
            int page     = 0;
            int rowCount = 5;

            return(await Task <HttpResponseMessage> .Factory.StartNew(() =>
            {
                alltimeWinners.GetTopMostVotedArtist(page, rowCount);
                pastbattls.GetPastBattls(page, rowCount);
                topUsers.GetTopMostVotesByUser(page, rowCount);
                mostVoted.GetMostVotedThisMonth(page, rowCount);

                var retorno = new
                {
                    alltimeresult = this.alltimeWinners,
                    pastbattleresut = this.pastbattls,
                    topusersresult = this.topUsers,
                    mosteVotedresult = this.mostVoted
                };

                return Request.CreateResponse <object>(HttpStatusCode.OK, retorno);
            }));
        }
Beispiel #3
0
        public IViewAlbumArtistSongTotalVotesBLL SongsMonth(int page = 0, int rowCount = 0)
        {
            model.GetMostVotedThisMonth(page, rowCount);

            return(model);
        }