Example #1
0
        public async Task <IActionResult> GetAsync([FromQuery] string search = null)
        {
            if (search == null)
            {
                List <L_GameData> gameDataAll = await _gameDataRepository.GetAllGameData();

                string json = JsonSerializer.Serialize(gameDataAll);
                return(new ContentResult
                {
                    StatusCode = 200,
                    ContentType = "application/json",
                    Content = json
                });
                // (200 OK response, with the notes serialized in the response body -- instead of some view's HTML)
            }
            // TODO:
            throw new NotImplementedException();
            //L_GameData gameData = _gameDataRepository.
            //return Ok(gameData);
        }