public string Get()
        {
            Console.WriteLine("Get all songs.");

            StateOfRequest mState = new StateOfRequest("SongNo");

            mState.CurrentPageNo = 1;
            mState.PageSize      = 50;

            // List<Song> songs = await _songsManager.GetAllSongs(mState);
            // get the first 50 songs
            List <Song> songs = _songsManager.GetOnePageOfSongs(mState);

            JObject jObjectForAll = new JObject();

            jObjectForAll.Add("pageNo", mState.CurrentPageNo);
            jObjectForAll.Add("pageSize", mState.PageSize);
            jObjectForAll.Add("totalRecords", mState.TotalRecords);
            jObjectForAll.Add("totalPages", mState.TotalPages);
            JObject jObject;
            JArray  jArray = new JArray();

            for (int i = 0; i < songs.Count; i++)
            {
                Song song = songs[i];
                jObject = JsonUtil.ConvertSongToJsongObject(song);
                jArray.Add(jObject);
            }
            jObjectForAll.Add("songs", jArray);

            return(jObjectForAll.ToString());
        }
        public IActionResult SongsList(string song_state)
        {
            if (!LoginUtil.CheckIfLoggedIn(HttpContext))
            {
                return(View(nameof(Index)));
            }

            StateOfRequest mState;

            if (string.IsNullOrEmpty(song_state))
            {
                mState = new StateOfRequest("SongNo");
            }
            else
            {
                mState = JsonUtil.GetObjectFromJsonString <StateOfRequest>(song_state);
            }

            List <Song> songs = _songsManager.GetOnePageOfSongs(mState);

            ViewBag.SongState = JsonUtil.SetJsonStringFromObject(mState);

            return(View(songs));
        }