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

            // TODO Get the series.
            var series = _seriesRepository.GetDetailById((int)id);

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

            // Sort the comic books.
            series.ComicBooks = series.ComicBooks
                                .OrderByDescending(cb => cb.IssueNumber)
                                .ToList();

            return(View(series));
        }