You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
You use the ADO.NET Entity Framework to model your entities.
The application connects to a Microsoft SQL Server 2008 database named AdventureWorks by using Windows Authentication.
Information about the required Entity Data Model (EDM) is stored in the following files:
* model.csdl
* model.ssdl
* model.msl
These files are embedded as resources in the MyCompanyData.dll file.You need to define the connection string
that is used by the application. Which connection string should you add to the app.config file?
A.
<add name=�AdventureWorksEntities�
connectionString=�metadata=res://MyComparny.Data,Culture=neutral,PublicKeyToken=null/model.csdIl
res://MyCompany.Data,Culture=neutral, PublicKeyToken=null/model.ssdl|
res://MyCompany.Data,Culture=neutral, PublicKeyToken=null/model.msl;
provider=System.Data.EntityClient;
provider connection string=�DataSource=localhost;Initial Catalog=AdventureWorks;lntegrated Security=True;multipleactivesuitsets=true’�
providerName=�System.Data.SqlClient�/>
B.
<add name=�AdventureWorksEntities�
connectionString=�metadata=res://MyComparny.Data,Culture=neutral,PublicKeyToken=null/model.csdIl
res://MyCompany.Data,Culture=neutral, PublicKeyToken=null/model.ssdl|
res://MyCompany.Data,Culture=neutral, PublicKeyToken=null/model.msl;
provider=System.Data.SqlClient;
provider connection string=�DataSource=localhost;Initial Catalog=AdventureWorks;lntegrated Security=True;multipleactivesuitsets=true’�
providerName=�System.Data.EntityClient�/>
C.
<add name=�AdventureWorksEntities�
connectionString=�metadata=res://MyComparny.Datamodel.csdl|
res://MyCompany.Data.model.ssdl|
res://MyCompany.Data.model.msl;
provider=System.Data.SqlClient;
provider connection string=�DataSource=localhost;Initial Catalog=AdventureWorks;lntegrated Security=SSPI;multipleactivesuitsets=true’�
providerName=�System.Data.EntityClient�/>
D.
<add name=�AdventureWorksEntities�
connectionString=�metadata=res://MyComparny.Data,Culture=neutral,PublicKeyToken=null/model.csdIl
res://MyComparny.Data,Culture=neutral,PublicKeyToken=null/model.ssdIl
res://MyComparny.Data,Culture=neutral,PublicKeyToken=null/model.msl;
provider=System.Data.OleDBClient;
provider connection string=�Provider=sqloledb;DataSource=localhost;Initial Catalog=AdventureWorks;lntegrated Security=SSPI;multipleactivesuitsets=true’�
providerName=�System.Data.EntityClient�/>
Explanation:
Answering this question pay attention to fact that Entity Framework is used, so settings
provider=”System.Data.SqlClient” and providerName=System.Data.EntityClient shold be set.Connection Strings
(http://msdn.microsoft.com/en-us/library/cc716756.aspx)
I am guessing that the question should say that the assembly name is MyCompany.Data.dll, not MyCompanyData.dll.