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 trial

C# Entity Framework Basics Introducing Entity Framework Using the Context

Shawn McCall
Shawn McCall
7,863 Points

Add method not working properly?

Nothing wrote to the console. I noticed that breakpoints aren't working after the Add method for the comic books property of the context. Any ideas?

Update: I set a breakpoint at the context.ComicBooks.Add method to see the Database.Connection.ConnectionString property. It reads as follows:

"ConnectionString ""Data Source=(localdb)\mssqllocaldb;Initial Catalog=ComicBookGalleryModel.Context;Integrated Security=True;MultipleActiveResultSets=True"

It doesn't seem to be coming up in the SQL Server Object Explorer.

Thanks

Steven Parker
Steven Parker
231,268 Points

If you'd like help with your code, you'll need to share it here; perhaps by posting a link to a Repo.

Pablo Wedemann Colchiesqui
Pablo Wedemann Colchiesqui
9,187 Points

I am having the same problem, did you found an answer?

1 Answer

Florian Stegemann
seal-mask
.a{fill-rule:evenodd;}techdegree
Florian Stegemann
Full Stack JavaScript Techdegree Student 22,660 Points

I had the same problem at first, but after waiting for a while, the program did actually work. On subsequent testruns the program then worked much faster. If that doesn't help, maybe just continue watching the next section, were James goes over setting up SQLLocalDb. I think this video here assumes, that LocalDb was automatically setup during the installation of Visual Studio, which might not be the case for you.