70-516 무료 덤프문제 온라인 액세스
| 시험코드: | 70-516 |
| 시험이름: | TS: Accessing Data with Microsoft .NET Framework 4 |
| 인증사: | Microsoft |
| 무료 덤프 문항수: | 196 |
| 업로드 날짜: | 2025-12-06 |
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?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application uses the ADO.NET Entity Framework to model entities.
The application includes a Customer entity along with a CustomerKey property of the Guid type as shown in
the following exhibit:
You discover that when the application adds a new instance of a Customer, calling the SaveChanges
method
results in the following error message: "Server generated keys are only supported for identity columns."
You need to ensure that the application can add new Customer entities. What should you do?
The user interface requires that a paged view be displayed of all the products sorted in alphabetical order.
The user interface supplies a current starting index and a page size in variables named startIndex and
pageSize of type int.
You need to construct a LINQ expression that will return the appropriate Parts from the database from an
existing
ContosoEntities context object named context. You begin by writing the following expression:
context.Parts
Which query parts should you use in sequence to complete the expression?
(To answer, move the appropriate actions from the list of actions to the answer area and arrange them in
the correct order.)
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?
Refer to the following lines in the case study: PA40 in \Model\Part.cs, PR16 in\Model\Product.cs, and CT14 in \Model\Component.cs
The application must create XML files that detail the part structure for any product. The XML files must use the following format:
<?xml version="1.0" encoding="utf-8"?>
<product name="Brush" description="Brush product" productType="1">
<component name="Handle" description="Handle" partType="2">
<component name="Screw" description="Screw" partType="3">
<component name="Wood" description="Wooden shaft" partType="45">
</component>
<component name="Head" description="Head" partType="5">
<component name="Screw" description="Screw" partType="3">
<component name="Bristles" description="Bristles" partType="4">
</component> </product>
You need to update the application to support the creation of an XElement object having a structure that will
serialize to the format shown above.
What should you do? (Each correct answer presents part of the solution. Choose two.)