public IActionResult TopRent()
        {
            if (HttpContext.Session.GetString("user") is null)
            {
                Response.Redirect("admin/login");
            }
            ViewBag.User = HttpContext.Session.GetString("user");
            var books = _rentDetaiRepository.GetTop5();

            return(View(books));
        }
Beispiel #2
0
        public IActionResult GetTop5()
        {
            var books = _repository.GetTop5();

            return(new JsonResult(books));
        }