Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

C# Entity Framework Basics CRUD Operations Creating Entities

Juan Ignacio Scopp
Juan Ignacio Scopp
Courses Plus Student 291 Points

When did the ComicBookLibraryManager method get coded?


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?


1 Answer

First, 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.