locked
Change the database after creating the .edmx file RRS feed

  • Question

  • Hi,

    Due to a requirement I had to change the database after I created the .edmx file. Its not the changes to the database I wanted to change the database. first I tried changing the connection string. 

    when the connection string is changed I can access the new database through the .edmx file. but the problem is when I tried to update the model from database it will try to update from the old database. 

    I dont know why EF is using the old connection string for updating the model. Please give me suggestions

    Thank you.

    Wednesday, July 28, 2010 6:25 AM

Answers

  • Hi,

    Right-click in your EDMX file and select "Properties". Then look at "Connection String" property value to see where your model is connecting.

    Best regards,

     

    JAReyes.

    Wednesday, July 28, 2010 6:33 AM

All replies

  • Hi,

    Right-click in your EDMX file and select "Properties". Then look at "Connection String" property value to see where your model is connecting.

    Best regards,

     

    JAReyes.

    Wednesday, July 28, 2010 6:33 AM
  • There is no "Connection String" property in the properties window for the EDMX.  Using Visual Studio 2010.  Only properties in that window are:

    • Build Action
    • Copy to Output Directory
    • Custom Tool
    • Custom Tool Namespace
    • File Name
    • Full Path

    So where to change the connection string?

    Thanks!

    Monday, December 20, 2010 4:19 PM
  • Hi,

    You can find the connection string in the App.config file located at your project root directory.

    Regards,

    JAReyes.


    Please remember to Vote & "Mark As Answer" if this post is helpful to you.
    Por favor, recuerda Votar y "Marcar como respuesta" si la solucion de esta pregunta te ha sido útil.
    Monday, December 20, 2010 5:22 PM
  • Double click on the .edmx file in solution explorer.  this will take you to the modelling window.  Right click and select properties.
    Wednesday, August 2, 2017 2:50 PM