コード例 #1
0
        public ActionResult Details(int id)                                         // Pour afficher toutes les infos d'un auteur en particulier
        {
            AuthorDAL authorDAL = new AuthorDAL((List <Author>)Session["Authors"]); // Récupération des auteurs (général)
            BookDAL   bookDAL   = new BookDAL((List <Book>)Session["Books"]);       // Récupération des livres (général)

            Author author = authorDAL.Read(id);                                     // Récupération de l'auteur en particulier

            //Création d'une modelView avec l'auteur + ses livres
            ShowAuthorModelView model = new ShowAuthorModelView(author, bookDAL.FindByAuthor(author));

            return(View(model));
        }