예제 #1
0
 public async Task <ActionResult <L_GameData> > GetById(int id)
 {
     if (await _gameDataRepository.GetGameDataById(id) is L_GameData gameData)
     {
         string json = JsonSerializer.Serialize(gameData);
         return(new ContentResult
         {
             StatusCode = 200,
             ContentType = "application/json",
             Content = json
         });
     }
     return(NotFound());
 }