0

I'am getting an error in my console application program and it says :

No connection string named 'SimpleBankEntities' could be found in the application config file.

However, I added entityFramework as a Reference. Also I have everything in my app.config file. Here is my <connectionStrings> :

<connectionStrings>
<add name="SimpleBankEntities" connectionString="metadata=res://*/SimpleBankModel.csdl|res://*/SimpleBankModel.ssdl|res://*/SimpleBankModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.;initial catalog=Training;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>

Thanks a lot, have a nice day !

If you need something more than that, please let me know.

Ahmet Batu Orhan
  • 118
  • 2
  • 14

1 Answers1

0

Do you have more than one project in your solution? If so, did you add the connection string to the config file in your startup project?

Everything looks correct if this is the configuration file in the start up project.

Larry Dukek
  • 2,179
  • 15
  • 16
  • Thanks TwistedStem, that works perfect. In other questions like this one, there were no answers, so that will be good for people who are having trouble with this issue. – Ahmet Batu Orhan Jun 07 '16 at 11:59