Esempio n. 1
0
        public ActionResult Add(int comicBookId)
        {
            var comicBook = new GetComicBookQuery(Context).Execute(comicBookId);

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

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

            viewModel.Init(Repository);

            return(View(viewModel));
        }
Esempio n. 2
0
        public ActionResult Add(int comicBookId)
        {
            // Retrieve a query thst the user is adding an artist to
            var comicBook = new GetComicBookQuery(Context).Execute(comicBookId);

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

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

            viewModel.Init(Repository, _artistsRepository);

            return(View(viewModel));
        }