locked
can't find the data base RRS feed

Answers

  • User-933407369 posted

    hi  Sdiri,

    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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 19, 2013 6:02 AM

All replies

  • User-330204900 posted

    This does not sound like Dynamic Data?

    Wednesday, August 14, 2013 6:13 AM
  • User-933407369 posted

    hi  Sdiri,

    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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 19, 2013 6:02 AM