コード例 #1
0
        public async Task <IActionResult> GetAsync()
        {
            var typeModels = await _fieldTypesService.GetAllAsync();

            var typeViewModels = _mapper.Map <IEnumerable <FieldTypeViewModel> >(typeModels);

            return(Ok(typeViewModels));
        }
コード例 #2
0
        public async void GetAll_FieldTypesCount()
        {
            var result = await _fieldTypeService.GetAllAsync();

            Assert.Equal(2, result.Count());
        }