- Home
- Microsoft Certification
- 70-516 Exam
- Microsoft.70-516.dumpsfiles Dumps
Free Microsoft 70-516 Exam Dumps Questions & Answers
| Exam Code/Number: | 70-516Join the discussion |
| Exam Name: | TS: Accessing Data with Microsoft .NET Framework 4 |
| Certification: | Microsoft |
| Question Number: | 196 |
| Publish Date: | May 30, 2026 |
|
Rating
100%
|
|
Total 196 questions
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 conceptual schema definition language (CSDL) file contains the following XML fragment.
<EntityType Name="Contact"> ... <Property Name="EmailPhoneComplexProperty"
Type="AdventureWorksModel.EmailPhone" Nullable="false" />
</EntityType>
...
<ComplexType Name="EmailPhone">
<Property Type="String" Name="EmailAddress" MaxLength="50" FixedLength="false" Unicode="true" />
<Property Type="String" Name="Phone" MaxLength="25" FixedLength="false" Unicode="true" /> </ComplexType>
You write the following code segment. (Line numbers are included for reference only.)
01 using (EntityConnection conn = new EntityConnection("name=AdvWksEntities"))
02 {
03 conn.Open();
04 string esqlQuery = @"SELECT VALUE contacts FROM
05 AdvWksEntities.Contacts AS contacts
06 WHERE contacts.ContactID == 3";
07 using (EntityCommand cmd = conn.CreateCommand())
08 {
09 cmd.CommandText = esqlQuery;
10 using (EntityDataReader rdr = cmd.ExecuteReader())
11 {
12 while (rdr.Read())
13
{
14
...
15
}
16
}
17
}
18 conn.Close(); 19 }
You need to ensure that the code returns a reference to a ComplexType entity in the model named
EmailPhone.
Which code segment should you insert at line 14?
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 use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that
uses the Entity Framework.
The application defines the following Entity Data Model.
Within the .edmx file, the following function is defined:
<Function Name="Round" ReturnType="Decimal"> <Parameter Name="val" Type="Decimal" /> <DefiningExpression>
CAST(val as Edm.Int32) </DefiningExpression> </Function>
The application includes the following LINQ query.
var query = from detail in context.SalesOrderDetails select detail.LineTotal.Round();
You need to ensure that the Round function executes on the database server when the query is executed. Which code segment should you use?
Which method will return all nodes of an XDocument?
You use Microsoft .NET Framework 4.0 to develop an application that connects to a Microsoft SQL Server
2008 database.
The application includes a table adapter named taStore, which has the following DataTable.
There is a row in the database that has a ProductID of 680. You need to change the Name column in the
row to "New Product Name".
Which code segment should you use?