Exemplo n.º 1
0
        // Method to add Default unSelect value for authors
        List <Author> FillSelectList()
        {
            var authors = authorRepository.List().ToList();

            authors.Insert(0, new Author {
                Id = -1, FullName = "---- Please Select an author ---"
            });

            return(authors);
        }
Exemplo n.º 2
0
        // GET: HomeController
        public ActionResult Index()
        {
            var authors = authorRepository.List();

            return(View(authors));
        }
Exemplo n.º 3
0
        // GET: BookController
        public ActionResult Index()
        {
            var books = bookRepository.List();

            return(View(books));
        }