public async Task <IActionResult> Delete(int id) { // successful DELETE returns 204 No Content with empty body if (await _gameDataRepository.GetGameDataById(id) is L_GameData gameData) { await _gameDataRepository.DeleteGameDataById(gameData.DataId); return(NoContent()); } return(NotFound()); }