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)); }
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)); }