Microsoft 70-516 Real Exam Questions
TS: Accessing Data with Microsoft .NET Framework 4
This exam is designed to test the candidate’s knowledge and skills on accessing data sources using ADO.NET and the .NET Framework.
Questions that contain code will be presented in either VB or C#. Candidates can select one of these languages when they start the exam.
QUESTION NO: 1
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You want to connect the application to a Microsoft SQL Sewer Express 2008
database named MyDatabase. The primary database file is named MyDatabase.mdf and it is stored in the App_ Data folder. You need to define the connection string.Which connection string should you add to the web.config file?
A. Data Source=loccalhost; Initial CataIogMyDatabase; Integrated Security=SSPl; User Instance= True
B. Data Source=\SQLEXPRESS; Initial Caalog=MyDataBase; Integrated Security= True; User Instance=True
C. Data Source=\SQLEXPRESS; AttachDbFilename=[DataDirectory]MyDatabasemdf;Integrated Secunty=True; User Instance=True
D. Data Source=SQLEXPRESS, AttachDbFilename=[DataDirectory]\App_Data\MyDatabase.mdf, Integraged Security=SSPl, User Instance=True
Answer: C
QUESTION NO: 2
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.The application connects to a Microsofi SQL Sever 2008 database.The application uses a Microsoft ADO.NET SQL Server managed provider. When a connection fails, the application logs connection information. including the full connection string. The information is stored as plain text in a .configfile.You need to ensure that the database credentials are secure.Which connection string should you add to the .config file?
A. Data SourcezmysefverMd,ess, Initial Catalog=myDataBase; lntegrated Security=SSPl; Persist Security lnfo=false,
B. Data SourcezmysefverMd,ess, Initial Catalog=myDataBase; lntegrated Security=SSPl; Persist Security lnfo=true;
C. Data SourcezmysefverMd,ess, Initial Catalog=myDataBase; User id=myUsemame; Password=myPassword; Persist Security lnfo=false,
D. Data SourcezmysefverMd,ess, Initial Catalog=myDataBase; User id=myUsemame; Password=myPassword; Persist Security lnfo= true,
Answer: A
QUESTION NO: 3
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.The application connects to a Microsoft SQL Server database.The application uses the ADO.NET Entity Framework to manage order data.The application makes a web service call to obtain orders from an order-tracknig system. You need to ensure that the orders are added to the local data store.Which method should you call on the ObectContext?
A. Attach
B. AttachTo
C. AddObject
D. ApplyCurrentValues
Answer: C
QUESTION NO: 4
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.You manually create your own Context class named AdventureWorksDB that inherits from ObjectContext. You need to use AdventureWorksDB to invoke a stored procedure that is defined in the data source. Which method should you call?
A. Translate
B. ExecuteFunction
C. ExecuteStoreQuery
D. ExecuteStoreCommand
Answer: B
QUESTION NO: 5
You use Microsoft Visual Studio 2010 and Microsoft NET Framework 4 to create an application The application uses the ADO NET Entity Framework to model entities You deploy an application to a production server. The application uses the model and mapping files that are deployed as application resources. You need to update the conceptual model for me application on inc production server What should you do?
A. Copy the updated edmx file to the production server
B. Copy the updated csdl Me to the production server
C. Copy the updated .ssdl rile to the production server
D. Recompile the application and redeploy the modified assembly files
Answer: D
QUESTION NO: 6
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application The application uses the ADO NET Entity Framework to model entities You
need to ensure that the model and mapping files are not deployed as apphcaton resources. What should you do’?
A. Modify tne connecton string in me application’s config ne to reter to the absolute physical path to the edmx file
B. Modify the connection string in the application’s config file to refer to the relative path to the edmx file
C. Set the value of the .edmx file’s Metadata Artifact Processing propefty to Copy to Output Directory
D. Set the value of the .edmx file’s Build Action property to Copy to Output.
Answer: C
QUESTION NO: 7
You use Microsoft Visual Studio 2010 and Microsoft NET Framework 4 to create an application You deploy a Windows Communication Foundation (WCF) Data Service to a production server. The application is hosted by Internet Information Services (US). After deployment applications that connect to the service receive the following error message ‘The server encountered an error processing the request. See server logs for more details You need to ensure that the actual exception data is provided to client computers. What should you do?
A. Modify the application’s Web config file Set the value for the customErrors element to Off
B. Modify the application’s Web config file Set the value for the customErrors element to RemoteOnly
C. Add the FaultContract attribute to the class that implements the data service
D. Add the Service Behavior attribute to the class that implements the data service.
Answer: D
Download | Password: certificatexam.com