1 out of 1 rated this helpful - Rate this topic

Choose Your Data Connection Dialog Box (Entity Data Model Wizard)

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The Choose Your Data Connection dialog box is the part of the Entity Data Model Wizard that enables you to specify the data source, connection options, and database to use to generate the .edmx file.

Which Data Connection Should Your Application Use to Connect to the Database?

Choose an existing connection from the drop-down list of connections, or click New Connection to open the Connection Properties dialog box and create a new connection to the database.

If you are logging onto the database server by using SQL Server Authentication, you must decide whether to include sensitive data (such as user name and password) in the connection string, or whether you will handle the sensitive data in your application code. Select the option that corresponds to your choice. For more information about security issues when you use connection strings, see Protecting Connection Information.

Entity Connection String

The Entity Connection String box displays the connection information based on your server and database connection selections.

Save Entity Connection Settings in App.Config or Web.Config File

To save entity connection settings in the App.Config or Web.Config file (depending on the project type), select Save the entity connection settings. Type a name for the connection or use the provided default name.

Saving connection strings in the configuration file simplifies maintaining your application if the database connection changes. If the database connection changes, you can edit the connection string in the configuration file. This means that you do not have to edit the source code and recompile the application. If you do not save the connection string, you will have to supply the connection string to a ObjectContext object to execute queries.

Bb399244.note(en-us,VS.110).gifNote:
Information is stored in the App.Config or Web.Config file as plain text. To reduce the risk of unauthorized access to sensitive information, you might want to encrypt your data.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.