Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 751433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:39:59+00:00 2026-05-14T14:39:59+00:00

I created an Entity Framework file. My database is called MyDB. My Entity Framework

  • 0

I created an Entity Framework file. My database is called MyDB. My Entity Framework file is MyDB.edmx and I used an existing connection string (MyDBConnectionString) to generate the edmx model.

It created two more connection strings:
MyDBEntities
MyDBContainer

What are these for? They look exactly the same and both have the information from my old connection string.

Do I still need my old connection string?

Update with more information:

Here are the connection strings:

<add name="MyDBConnectionString" connectionString="Data Source=localhost;Initial Catalog=MyDB;Persist Security Info=False;User ID=MyDB;Password=MyDB" providerName="System.Data.SqlClient" />
<add name="MyDBEntities" connectionString="metadata=res://*/App_Code.MyDB.csdl|res://*/App_Code.MyDB.ssdl|res://*/App_Code.MyDB.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=localhost;Initial Catalog=MyDB;Persist Security Info=True;User ID=MyDB;Password=MyDB;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
<add name="MyDBContainer" connectionString="metadata=res://*/App_Code.MyDB.csdl|res://*/App_Code.MyDB.ssdl|res://*/App_Code.MyDB.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=localhost;Initial Catalog=MyDB;Persist Security Info=True;User ID=MyDB;Password=MyDB;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />

I created the first one called MyDBConnectionString. Then, when I generated the edmx model from the database visual studio created the MyDBEntities and MyDBContainer connection strings. What are the other two (Entities and Container) for? Do I not need the original connection string anymore?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:39:59+00:00Added an answer on May 14, 2026 at 2:39 pm

    You have three connectionStrings. Two are EF connectionStrings, one (MyDBConnectionString) is for ADO.NET.

    You only need one of the EF connectionStrings. Keep the one which your model refers to. It will have the same name as the model itself.

    You should probably keep MyDBConnectionString, too. If you want to use forms authentication, for example, you’ll need that connectionString if you configure a SQL membership provider. They should both be kept in sync to point to the same DB.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a edmx file created using the entity entity framework model. Whenever I
I created an Entity Framework model based on an existing database, then generated the
I generated a database through entity framework. Here is the connection string: <add name=AnnouncementsContainer
I am having trouble changing the connection string used by entity framework code first
I've created a database model with model-first method using Entity Framework 4.0. I then
I have created a new application using Entity Framework 4.3 database migrations. The migrations
I have created a Dynamic Data site against an Entity Framework Model I have
I am stating out with entity framework. I have created my ADO.NET Entity Model
With Entity Framework, whenever I update model from database inside Visual Studio the model
How do I change the connection string in a code first entity framework/MVC application?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.