Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Letβs add a comic book repository to our project to give us a central location for storing and managing our comic book model instances.
Follow Along
To follow along commiting your changes to this course, you'll need to fork the aspnet-comic-book-gallery repo. Then you can clone, commit, and push your changes to your fork like this:
git clone <your-fork>
cd aspnet-comic-book-gallery
git checkout tags/v4.6 -b adding-the-repository
Code
Hereβs a copy of the comic books data that you can use in your own repository class.
private static ComicBook[] _comicBooks = new ComicBook[]
{
new ComicBook()
{
SeriesTitle = "The Amazing Spider-Man",
IssueNumber = 700,
DescriptionHtml = "<p>Final issue! Witness the final hours of Doctor Octopus' life and his one, last, great act of revenge! Even if Spider-Man survives...<strong>will Peter Parker?</strong></p>",
Artists = new Artist[]
{
new Artist() { Name = "Dan Slott", Role = "Script" },
new Artist() { Name = "Humberto Ramos", Role = "Pencils" },
new Artist() { Name = "Victor Olazaba", Role = "Inks" },
new Artist() { Name = "Edgar Delgado", Role = "Colors" },
new Artist() { Name = "Chris Eliopoulos", Role = "Letters" },
},
Favorite = false
},
new ComicBook()
{
SeriesTitle = "The Amazing Spider-Man",
IssueNumber = 657,
DescriptionHtml = "<p><strong>FF: THREE TIE-IN.</strong> Spider-Man visits the FF for a very private wake--just for family.</p>",
Artists = new Artist[]
{
new Artist() { Name = "Dan Slott", Role = "Script" },
new Artist() { Name = "Marcos Martin", Role = "Pencils" },
new Artist() { Name = "Marcos Martin", Role = "Inks" },
new Artist() { Name = "Muntsa Vicente", Role = "Colors" },
new Artist() { Name = "Joe Caramagna", Role = "Letters" }
},
Favorite = false
},
new ComicBook()
{
SeriesTitle = "Bone",
IssueNumber = 50,
DescriptionHtml = "<p><strong>The Dungeon & The Parapet, Part 1.</strong> Thorn is discovered by Lord Tarsil and the corrupted Stickeaters and thrown into a dungeon with Fone Bone. As she sleeps, a message comes to her about the mysterious \"Crown of Horns\".</p>",
Artists = new Artist[]
{
new Artist() { Name = "Jeff Smith", Role = "Script" },
new Artist() { Name = "Jeff Smith", Role = "Pencils" },
new Artist() { Name = "Jeff Smith", Role = "Inks" },
new Artist() { Name = "Jeff Smith", Role = "Letters" }
},
Favorite = false
}
};
Additional Learning
For more information on how to move around Visual Studio, see this page on MSDN.
See these MSDN pages for more information on code snippets in Visual Studio.
Keyboard Shortcuts
-
CTRL+TAB
orCTRL+SHIFT+TAB
- Navigate through your open files -
CTRL+SHIFT+B
- Build solution
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up