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

            // Include the "Series" navigation property.
            var comicBook = _comicBooksRepository.GetComicBookWithSeries((int)id);

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

            return(View(comicBook));
        }
Beispiel #2
0
        public ActionResult Add(int comicBookId)
        {
            var comicBook = comicBooksRepository.GetComicBookWithSeries(comicBookId);

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

            var viewModel = new ComicBookArtistsAddViewModel()
            {
                ComicBook = comicBook
            };

            viewModel.Init(Repository);

            return(View(viewModel));
        }