Beispiel #1
0
        public ActionResult Detail(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var comicBook = comicBooksRepository.GetComicBookWithSeriesArtistAndRole(id.Value);

            if (comicBook == null)
            {
                return(HttpNotFound());
            }

            // Sort the artists.
            comicBook.Artists = comicBook.Artists.OrderBy(a => a.Role.Name).ToList();

            return(View(comicBook));
        }