PrepAway - Latest Free Exam Questions & Answers

Tag: 70-516

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

What should you do?

The entity data model must be configured to provide a way you cal the sp_FindObsolete stored procedure.
The returned data must implement the Descendants property.

In Visual Studio 2010, you open the Add functions Import dialog box from the EDMX diagram and enter the information
shown in the following graphic.

You need to complete the configuration in the dialog box. What should you do?

What should you do?

You have a ContosoEntities context object named context and a Color object stored in a variable named color.

You write the following code:
context.Colors.DeleteObject(color);
context.SaveChanges();

When the code runs, it generates the following exception:

System.Data.UpdateException: An error occurred while updating the entries. See the inner exception for detials. —>
System.Data.SqlClient.SqlException: The DELETE satement conflicted with the REFERENCE constraint “FK_PartColor”.
The conflict occurred in database “Contoso”, table “dbo.Parts”, column ‘ColorId’

You need to resolve the exception without negatively impacting the rest of the application. What should you do?

What should you do?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that uses the Entity Framework.
You create an Entity Data Model (EDM) named Model. You need to ensure that the Storage Schema Definition Language (SSDL)
of the EDM can be modified without rebuilding the application. What should you do?

Which line of code should you use?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The configuration file contains the following code segment.

<configuration>
<connectionStrings>
<add name=”AdventureWorksLT”
connectionString=”DataSource=SQL01;InitialCatalog=AdventureWorksLT;IntegratedSecurity=True;”
providerName=”System.Data.SqlClient”/>
</connectionStrings>
</configuration>

You need to retrieve the connection string named AdventureWorksLT from the configuration file. Which line of code should you use?

What should you do?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
You create an Entity Data Model (EDM) by using the Microsoft ADO.NET Entity Data Model Designer (Entity Designer).
The EDM contains a complex type. You need to map a stored procedure to the complex type by using the Entity Designer.
What should you do?

Which code segment should you use?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that uses LINQ to SQL.
You create a data model name AdvWorksDataContext, and you add the Product table to the data model.
The Product table contains a decimal column named ListPrice and a string column named Color.
You need to update ListPrice column where the product color is Black or Red. Which code segment should you use?

What are two possible code segments that you can use to achieve this goal?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application.
You use the ADO.NET Entity Framework Designer to model entities.
The application includes self-tracking entities as shown in the following diagram.

There is a Person entity names person1 that has TrackChanges turned on.
You need to delete all e-mail addresses that are associated with person1 by using an ObjectContext.

What are two possible code segments that you can use to achieve this goal?
(Each correct answer presents a complete solution. Choose two).


Page 7 of 19« First...56789...Last »