Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJason Hapner
5,283 PointsIf instead of a ComicBook[] I had opted to use a List<ComicBook>, how would i indicate that in the @model declaration?
If instead of a ComicBook[] I had opted to use a List<ComicBook>, how would i indicate that in the @model declaration? @model ComicBookGallery.Models.List<ComicBook> doesn't work.
2 Answers
Simon Coates
8,377 PointsOffhand, I think @model ComicBookGallery.Models.List<ComicBook> would require that List be in the ComicBookGallery namespace. Maybe List<ComicBookGallery.Models.ComicBook> or maybe you might need to specify the list namespace (System.Collections.Generic).
Jason Hapner
5,283 Pointsthanks, I actually was able to work it out, it was @model List<ComicBookGallery.Models.ComicBook>