public IActionResult List()
        {
            if (!_repository.Any())
            {
                return(View("Empty"));
            }

            var authors = _repository.GetAllWithBooks();

            return(View(authors));
        }
Esempio n. 2
0
        public IActionResult List()
        {
            if (!Admin.logged)
            {
                return(RedirectToAction("Login", "Admin", 0));
            }
            if (!_repository.Any())
            {
                return(View("Empty"));
            }

            var authors = _repository.GetAllWithBooks();

            return(View(authors));
        }
Esempio n. 3
0
 public bool Any(string authorId)
 {
     return(_authorRepository.Any(authorId));
 }