Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does App=EntityFramework do in Sql connection string?

I have 2 connection strings - 1 local and 1 for my main production server. Entity Framework added App=EntityFramework to my local string when I installed it (4.1) - I'm now on 4.3. What does this do - I can't find any reference to it?

Here's my local connection string:

<add name="LocalConnection"       providerName="System.Data.EntityClient"       connectionString="metadata=       res://*/;       provider=System.Data.SqlClient;       provider connection string='       Data Source=.\SQLEXPRESS;       AttachDBFilename=C:\mypath\MyDb.mdf;       Integrated Security=True;       User Instance=True;       MultipleActiveResultSets=True;       App=EntityFramework'" /> 

Just curious!

like image 773
dotnetnoob Avatar asked Mar 20 '13 09:03

dotnetnoob


People also ask

How do I pass username and password in SQL connection string?

Using a non-standard portServer=myServerName,myPortNumber;Database=myDataBase;User Id=myUsername;Password=myPassword; The default SQL Server port is 1433 and there is no need to specify that in the connection string.

How do I test my EDMX connection string?

Open the edmx (go to properties, the connection string should be blank), close the edmx file again. Open the app. config and uncomment the connection string (save file) Open the edmx, go to properties, you should see the connection string uptated!!

What is metadata in connection string?

The Metadata parameter contains a list of locations for the EntityClient provider to search for model and mapping files. Model and mapping files are often deployed in the same directory as the application executable file.

What is Integrated Security in connection string?

Integrated Security actually ensures that you are connecting with SQL Server using Windows Authentication, not SQL Authentication; which requires username and password to be provided with the connecting string.


2 Answers

App and Application Name are simply a way for somebody debugging SQL Server to know which client is connecting to it. If you had a SQL Server that has several apps that used it, it might be hard to know which one was sending which statements. If each app used a different Application Name it would be very clear.

Check this out for more info.

like image 112
d512 Avatar answered Sep 29 '22 16:09

d512


It's just the synonym of the Application Name.

You can see the Connection String properties outlined here:

http://msdn.microsoft.com/en-gb/library/system.data.sqlclient.sqlconnection.connectionstring.aspx

like image 36
Darren Avatar answered Sep 29 '22 18:09

Darren