public async Task <ActionResult <ChoiceResponse[]> > Get(int quizId, int questionId) { var getAllResponse = await _choiceService.GetAll(quizId, questionId); if (!getAllResponse.Success) { if (!getAllResponse.Found) { return(NotFound(getAllResponse.Errors)); } return(NoContent()); } return(getAllResponse.Object); }
async public Task <IActionResult> GetAll() { var data = await _choiceService.GetAll(); return(data.Success ? Ok(data) : BadRequest(data)); }