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!

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# ASP.NET MVC Forms Creating a Basic Form Handling a Form Post

Where is the database?

I looked through the SQL explorer and do not see a database for this project. SO I am assuming that Data is generated in memory and deleted when refreshed or something like that. I've been though Entity framework and MVC and I guess I'm not getting it why I don't see tables with data stored.

You might have to manually add the database either through menu file->add and so on or right click and add-> database As least that is for as far as i remember visual studio.

4 Answers

There's no database for this project! Take a look inside the "Data.cs" file under the "Data" folder. You'll find the following comment at the very top:

"Note: The code in this class is not to be considered a "best practice" example of how to do data persistence, but rather as workaround for not having a database to persist data to."

I'm really lost here I need an explanation to completely understand.

You May have to Search Manually Within VS Explorer through the menu and add it Manually to the project. That is as far as in can Remember. It has been a while sinds ik last Touched used VS.

Go to Microsoft developer site and see how you manually can add the database. May your solution explorer does not see the database directly.