Last post Aug 19, 2013 06:02 AM by Happy Chen - MSFT
Aug 14, 2013 05:13 AM|Sdiri|LINK
I follow evry step in this tutorial http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application
but i don't get it
i build the migration, models, controllers but visual studio can not find the data base named "SchoolContext" when i select the server explorer
any help please i have 2 weeks in this !!
Aug 14, 2013 06:13 AM|sjnaughton|LINK
This does not sound like Dynamic Data?
Aug 19, 2013 06:02 AM|Happy Chen - MSFT|LINK
According to your description, my understanding is that you cann’t find the data base named "SchoolContext" in the server explorer . this
tutorial http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application ,
SchoolContext is not database . You create this class by deriving from the
System.Data.Entity.DbContext class. In your code
you specify which entities are included in the data model. You can also customize certain Entity Framework behavior. In this project, the
class is named SchoolContext.
There's also a Web.config file is in the Views subfolder that you don't need to update.)
<add name="SchoolContext" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=ContosoUniversity;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|\ContosoUniversity.mdf" providerName="System.Data.SqlClient" />
The “ContosoUniversity.mdf” is database which you want to find.
I hope it helps you.