public async Task <IActionResult> Index()
        {
            var listBangKiemResult = await _iDanhMucRepo.GetAll();

            var listBangKiem = listBangKiemResult.ToList();

            ViewBag.ActiveNoiDung = "active";
            return(View(listBangKiem));
        }
Example #2
0
        public async Task <IActionResult> GetAll()
        {
            try
            {
                var kqResult = await _iDanhMucRepo.GetAll();

                var kq = kqResult.ToList();
                return(PartialView("_ListDanhMuc", kq));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return(Content("0"));
            }
        }
        public async Task <IActionResult> Index()
        {
            try
            {
                var sw = Stopwatch.StartNew();


                Console.WriteLine("Time elapsed: " + sw.ElapsedMilliseconds);


                var listDanhMucResult = await _iDanhMucRepo.GetAll();

                var listDanhMuc = listDanhMucResult.ToList();
                sw.Stop();
                ViewBag.ActiveBk = "active";
                ViewBag.time     = sw.ElapsedMilliseconds;
                return(View(listDanhMuc));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }