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 trialJuan Ignacio Scopp
Courses Plus Student 291 PointsWhen did the ComicBookLibraryManager method get coded?
Hello!
I don't remember working on this solution before, did the teacher code the GetComicBook, GetContext and other methods on previous videos?
I'm a bit lost on how those methods came to life, could a bit of background be provided?
Thanks.
1 Answer
Ole Vølund Skov Mortensen
27,842 PointsFirst, ComicBookLibraryManager is NOT a method it's a NameSpace. It defines your application folder/Solution. The answer is simple. GetContex() method was a method made beforehand and your teacher encourage you doing the course to write his code for him. to put it simply, the GetContext() method Instantiate an instance of The context class so as to make use of DRY Principle it also make the code cleaner for each time you need to a table from the Context. The GetComicBook() method returns a single comic entry and all the table info in realtion to that comicBook table. the method should have been made in an earlier course about building a C# console app.