Example #1
0
        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));
        }
Example #2
0
        public async void GetAll_RightDatasetsCount()
        {
            var result = await _datasetService.GetAllAsync();

            Assert.Equal(2, result.Count());
        }
Example #3
0
        public async Task <IActionResult> GetAllAsync()
        {
            var studies = await _datasetService.GetAllAsync();

            return(new JsonResult(studies));
        }