PrepAway - Latest Free Exam Questions & Answers

Category: 70-516 (v.2)

Exam 70-516: TS: Accessing Data with Microsoft .NET Framework 4 (update October 26th, 2015)

Which the correct Propertie to insert?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 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 the correct Propertie to insert?

Which two actions should you perform?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a multi-tier
application. You use Microsoft ADO.NET Entity Data Model (EDM) to model entities. The model
contains entities named SalesOrderHeader and SalesOrderDetail. For performance considerations in
querying SalesOrderHeader, you detach SalesOrderDetail entities from ObjectContext. You need to
ensure that changes made to existing nSalesOrderDetail entities updated in other areas of your
application are persisted to the database. Which two actions should you perform? (Each correct
answer presents part of the solution. Choose two.)

You have been assigned the task of writing code that executes an Entity SQL query that return…

You have been assigned the task of writing code that executes an Entity SQL query that returns
entity type objects that contain a property of a complex type. You need to fix line 12 –
Choose the correct line of code
01 using (EntityCommand cmd = conn.CreateCommand())
02 {
03 cmd.CommandText = esqlQuery;
04 EntityParameter param = new EntityParameter();
05 param.ParameterName = “id”;
06 param.Value = 3;
07 cmd.Parameters.Add(param);
08 using (EntityDataReader rdr = cmd.ExecuteReader(CommandBehavior.SequentialAccess))
09 {
10 while (rdr.Read())
11 {
12
13 Console.WriteLine(“Email and Phone Info:”);
14 for (int i = 0; i < nestedRecord.FieldCount; i++)
15 {
16 Console.WriteLine(” ” + nestedRecord.GetName(i) + “: ” + nestedRecord.GetValue(i));
17 }

18 }
19 }

Which method should you use?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 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?

Which code segment should you inser at the empty line?

The application contains following XML document.
<feed>
<title>Products</title>
<entry>
<title>Entry title 1</title>
<author>Author 1</author>
<content>
<properties>
<description>some description</description>
<notes>some notes</notes>

<comments>some comments</comments>
</properties>
</content>
</entry>

</feed>
You plan to add localizationfeatures to the application.
You add the following code segment:
public IEnumerable <XNode> GetTextNodesForLocalization(XDocument doc)
{
— empty line here
return from n in nodes
where n.NodeType = XmlNodeType.Text
select n;
}
You need to ensure that the GetTextNodeForLocalization method returns all the XML text nodes of
the XML document. Which code segment should you inser at the empty line?

Which query parts should you use in sequence to complete the expression?

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.)


Page 18 of 31« First...10...1617181920...30...Last »