public async Task <IActionResult> Get(int playerId, int questionnaireId) { try { bool result = await _service.GetQuestionnairePlayerResponse(playerId, questionnaireId); return(new ObjectResult(result)); } catch (Exception ex) { Log.Error(ex, ex.Message); return(BadRequest(ex.Message)); } }
public async void GetQuestionnairePlayerResponseTest(int playerId, int questionnaireId) { try { var responses = await _playerresponseservice.GetQuestionnairePlayerResponse(playerId, questionnaireId); Assert.NotNull(responses); } catch (Exception e) { Console.WriteLine(e); if (e.Message.StartsWith("Sequence contains no matching element")) { Console.WriteLine(e.Message); } throw; } }