PrepAway - Latest Free Exam Questions & Answers

Category: 70-516

Exam 70-516: TS: Accessing Data with Microsoft .NET Framework 4

What should you do in the Application.Client Project?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create a Windows Communication
Foundation (WCF) Data Services service. The solution contains the projects shown in the following table.

The WCF data service exposes an Entity Framework model. You need to Access the service by using a WCF Data Services client.
What should you do in the Application.Client Project?

What should you do?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create a Windows Communication Foundation (WCF) Data Services service.
WCF Data Services uses an authentication scheme that requires an HTTP request that has the following header format:

GET /Odata.svc/Products(1)
Authorization: WRAP access_token=123456789

The application includes the following code. (Line numbers are included for reference only.)

01 public class program
02 {
03 Public void GetProducts()
04 {
05 var proxy = new MyDataServiceContext(“…”);
06 …
07 }
08 }

You need to ensure that the correct authentication header is present when requests are made by using MyDataServiceContext.
What should you do?

Which code segment should you use?

You use Microsoft Visual Studio 2010 and .NET Framework 4.0 to create an application.
The application connects to a Microsoft SQL Server 2008 database. The application contains the following code segment.

string SQL = string.Format(SELECT * FROM Customer WHERE CompanyName LIKE %{0}%, companyName);
var cmd = new SqlCommand(SQL, con);

You need to reduce the vulnerability to SQL injection attacks. Which code segment should you use?

What should you do?

You use Microsoft Visual Studio 2010 and .NET Framework 4.0 to develop an application that uses the Entity Data Model for the fallowing database tables.

You need to ensure that the entity that is mapped to the ContectTypeDerived table derives from the entity
that is mapped to the ContentTypeBase table. What should you do?

What should you do?

You use Microsoft Visual Studio 2010 and .NET Framework 4.0 to develop an application.
You use entity Framework Designer to create an Entity Data Model from an existing database by using the Generate From Database wizard.
The model contains an entity type named Product. The Product type requires an additional property that is not mapped to database colomn.
You need to add the property to product. What should you do?

What should you do?

You use Microsoft Visual Studio 2010 and .NET Framework 4.0 to enhance and existing application use Entity Framework.
The classes that represent the entites in the model are Plain old CLR Object (POCO) Classes.
You need to connect the existing POCO classes to an entity framework context. What should you do?

Which code segment should you use?

You use Microsoft .NET Framework 4.0 to develop an ASP.NET application. The application uses Integrated Windows authentication.
The application accesses data in a Microsoft SQL Server 2008 database that is located on the same server as the application.
You use the following connection string to connect to the database.

Integrated Security=SSPI; Initial Catalog=AdventureWorks;

The application must also execute a stored procedure on the same server on a database named pubs.
Users connect to the ASP.NET application through the intranet by using Windows-based authentication.
You need to ensure that the application will use connection pooling whenever possible and will keep the number of pools to a minimum.
Which code segment should you use?

Which is the correct Property to insert?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application connects to a Microsoft SQL Server 2008 database. The application uses a Microsoft ADO.NET SQL Server managed provider.

“Data Source=myServerAddress; Initial Catalog=myDataBase; User Id=myUsername; Password=secret;”

You need to ensure that the database credentials are secure. Which is the correct Property to insert?

Which method should you use?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application connects to a Microsoft SQL Server 2008 database.

SQLConnection conn = new SQLConnection(connectionString);
conn.Open();
SqlTransaction tran = db.BeginTransaction(IsolationLevel. …);

You must retrieve not commited records originate from various transactions. Which method should you use?


Page 10 of 19« First...89101112...Last »