public async Task <IActionResult> Index()
        {
            var categories = await _categoryApiService.GetAllAsync();

            var result = _mapper.Map <IEnumerable <CategoryDto> >(categories);

            return(View(result));
        }
        public async Task <IActionResult> Index()
        {
            var category = await _categoryApiService.GetAllAsync();

            var response = _mapper.Map <IEnumerable <CategoryDTO> >(category).ToList();

            return(View(response));
        }
        public async Task <IActionResult> Index()
        {
            //ilk önce tüm categoryleri alalım

            var categories = await _categoryApiService.GetAllAsync();

            //return View(_mapper.Map<IEnumerable<CategoryDto>>(categories));
            return(View(_mapper.Map <IEnumerable <CategoryDto> >(categories)));
        }
Beispiel #4
0
        public async Task <IActionResult> Index()
        {
            var categories = await _categoryApiService.GetAllAsync();

            return(View(categories));
        }
        public async Task <IActionResult> Index()
        {
            var categories = await _categoryApiService.GetAllAsync();

            return(View(_mapper.Map <List <CategoryDto> >(categories)));
        }
Beispiel #6
0
        public async Task <IActionResult> Create()
        {
            ViewBag.Category = await _categoryApiService.GetAllAsync();

            return(View());
        }