The Entity Framework Code first checks whether the database used by the connection string exists, and if it does not, automatically creates the database file. You can see if the database is created under the App_Data folder (if you don't see the movies.mdf file, click the Show All Files button on the Solution Explorer toolbar, click the Refresh button, and then expand App_Data folder).
Figure 1:movies.mdf File Location
Double-click the movies.mdf file, open Server Explorer, and then expand the Tables directory to view the Movies datasheet.
Figure 2: Server Explorer
Right-Movies The table and select "Show Table Data" To view the movie data we created.
Figure 3:movies the data in the table
Right-Movies The table and select Open Table definition to see the table structure created by the entity Framework Code first for us.
Figure 4:movies Table Structure
Entity Framework Code First automatically creates a table structure, including field names and data types, based on our movie class.
After we have finished viewing or editing the database, to close the connection in Server Explorer, right- moviedbcontext, select "Close Connection". (If you don't close the connection, you may get an error The next time you run the program)
Figure 5: Close the connection menu
Now that we have a database and a few simple pages to display the data, in the next chapters we will look at the code generated by the other scaffolding and add a Searchindex method and a Searchindex view to find the movie in the database.
ASP. NET MVC 5 tutorial: Using SQL Server LocalDB