public async Task <ActionResult <IEnumerable <Dataset> > > GetAllAsync() { IEnumerable <Dataset> datasets; try { datasets = await _datasetService.GetAllAsync(); } catch (Exception ex) { return(BadRequest(ex.Message)); } return(Ok(datasets)); }
public async void GetAll_RightDatasetsCount() { var result = await _datasetService.GetAllAsync(); Assert.Equal(2, result.Count()); }
public async Task <IActionResult> GetAllAsync() { var studies = await _datasetService.GetAllAsync(); return(new JsonResult(studies)); }