3 12 2015
[FREE]Braindump2go 70-516 Exam Dumps Download (261-270)
MICROSOFT NEWS: 70-516 Exam Questions has been Updated Today! Get Latest 70-516 VCE and 70-516PDF Instantly! Welcome to Download the Newest Braindump2go 70-516 VE&70-516 PDF Dumps: http://www.braindump2go.com/70-516.html (286 Q&As)
Instant Download 70-516 PDF Files! New Updated 286 Exam Questions and Answers help 100% Exam Pass! 70-516 Certification Get Quickly!
Exam Code: 70-516
Exam Name: TS: Accessing Data with Microsoft .NET Framework 4
Certification Provider: Microsoft
Corresponding Certifications: MCPD, MCPD: Web Developer 4, MCPD: Windows Developer 4, MCTS, MCTS: Microsoft .NET Framework 4, Data Access
70-516 Dumps,70-516 Dumps PDF,70-516 Exam PDF,70-516 Book,70-516 Study Guide,70-516 eBook,70-516 eBook PDF,70-516 Exam Questions,70-516 Training Kit,70-516 PDF,70-516 Microsoft Exam,70-516 VCE,70-516 Braindump,70-516 Braindumps PDF,70-516 Braindumps Free,70-516 Practice Test,70-516 Practice Exam,70-516 Preparation,70-516 Preparation Materials,70-516 Practice Questions
QUESTION 261
You use Microsoft .NET Framework 4 to create a data access layer component.
The component will use an existing conceptual data model named Modell.
Modell does not have an underlying database associated to it.
You need to create an underlying database for Modell by using the least amount of code.
Which tool should you use?
A. Server Explorer
B. Entity Framework Designer
C. Entity Data Model Wizard
D. Generate Database Wizard
Answer: D
QUESTION 262
You use Microsoft .NET Framework 4 to create an application.
The application connects to a Microsoft SQL Server database.
The application contains an Entity Framework model that has an entity named Products.
You need to a write a method that accepts an input parameter named Product.
The method must delete Product from the SQL Server database by using LINQ to Entities.
You write the following code:
Which code segment should you insert at line 06?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
QUESTION 263
Drag and Drop Question
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 startlndex 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.)
Answer:
QUESTION 264
You have a database named DB1 that contains a table named Customers.
You declare a DataSet named customersDataSet.
You need to ensure that customersDataSet contains all of the records from the Customers table. Which code should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Explanation:
– Example: To create a sample Visual C# .NET console application that demonstrates how to use the SqlCommandBuilder object to automatically generate the DeleteCommand, the InsertCommand, and the UpdateCommand properties of the SqlCommand object for a SqlDataAdapter object.
SqlConnection cn = new SqlConnection();
DataSet CustomersDataSet = new DataSet();
SqlDataAdapter da;
SqlCommandBuilder cmdBuilder;
//Set the connection string of the SqlConnection object to connect
//to the SQL Server database in which you created the sample
//table.
cn.ConnectionString = “Server=server;Database=northwind;UID=login;PWD=password;”;
cn.Open();
//Initialize the SqlDataAdapter object by specifying a Select command
//that retrieves data from the sample table.
da = new SqlDataAdapter(“select * from CustTest order by CustId”, cn);
//Initialize the SqlCommandBuilder object to automatically generate and initialize
//the UpdateCommand, InsertCommand, and DeleteCommand properties of the SqlDataAdapter.
cmdBuilder = new SqlCommandBuilder(da);
//Populate the DataSet by running the Fill method of the SqlDataAdapter.
da.Fill(CustomersDataSet, “Customers”);
QUESTION 265
Drag and Drop Question
You use Microsoft .NET Framework 4 to create a data access layer component.
The component accesses data from a Microsoft SQL Server database named DB1.
The component contains a class named Classl that represents data from a table in DB1 named Tablel.
The following is the definition of Class1:
A database developer creates the following stored procedure to add entries to Table1:
You need to edit the Entity Data Model (EDM) for EDMCIassl to use the uspInsertTablel stored procedure to add data to the database.
What should you do? (Develop the solution by selecting and ordering the required code snippets. You may not need all of the code snippets.)
Answer:
QUESTION 266
You use Microsoft Visual Studio 2010 and Microsoft NET Framework 4 to create an application. The application contains the following XML fragment.
<ApplicationMenu>
<Menultem name’File’>
Menuftem name=’New>
<Menultem nameI?rojectw I>
<Menultem name’Web Site’ I><4Aenultem>
<Menultem name=’Open><Menultem name=Project”>
<Menultem name’Web Site”>
<iNenultem><Menultem narner”Save0 1>
</1ienuttem>
<Menultem nameEdr>
<Menultem nameCut” I>
<Menultem name”C0W I>
<Menultem name’Paste01>
<`Menultem>
<Menultem name’1-4elp’>
<Menultem namezlHeIp I>
<Menultem name”About’ I>
</Menulteni>
</ApplicationMenu’
The application queries the XML fragment by using the Xml Document class.
You need to select all the descendant elements of the Menultem element that has its name attribute as File Which XPath expression should you use?
A. //[@name=’File’][name( )`Menultem’]
B. /ApplicationMenu/Menultem[FiI&)f(Menultem
C. /ApphcationMenulMenultem/descendant: :Menultem[file’]
D. /ApplicationMenu/Menultem[name=File’]/descendant. Menultem
Answer: D
Explanation:
XPath Examples:
XmlNodeList nodes =
doc.SelectNodes(“/ApplicationMenu/MenuItem[@name=’File’]/descendant::
MenuItem”); // 01 == 02
XmlNodeList nodes =
doc.SelectNodes(“/ApplicationMenu/MenuItem[@name=’File’]//MenuItem”); // 02 ==
01
XmlNodeList nodes =
doc.SelectNodes(“/ApplicationMenu/MenuItem[2]/descendant::MenuItem”); // 03
XmlNodeList nodes =
doc.SelectNodes(“/ApplicationMenu/MenuItem[last()]/descendant::MenuItem”); // 04
XmlNodeList nodes =
doc.SelectNodes(“/ApplicationMenu/MenuItem/descendant::MenuItem[/ApplicationMenu/ MenuItem/@name=@name]”); // 05
XmlNodeList nodes = doc.SelectNodes(“/ApplicationMenu/MenuItem/*”); // 06
XmlNodeList nodes =
doc.SelectNodes(“/ApplicationMenu/MenuItem/descendant::*[@Description]”); //07
XmlNodeList nodes =
doc.SelectNodes(“/ApplicationMenu/MenuItem[MenuItem][position()=2]”); // 08 == 09 XmlNodeList nodes = doc.SelectNodes(“/ApplicationMenu/MenuItem[MenuItem and position()=2]”); // 09 == 08
XmlNodeList nodes = doc.SelectNodes(“/ApplicationMenu/MenuItem[SubMenu or position()=2]”); // 10
XPath Examples
(http://msdn.microsoft.com/en-us/library/ms256086.aspx)
QUESTION 267
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application that uses the Entity Framework.
You create the following Entity Data Model.
You write the following code. (Line numbers are included for reference only.)
01 Using context As New Model1Container()
02 Dim cust As Customer = context.Customers.First()
03 cust.CompanyName = “Contoso”
04 Dim count As Integer = 0
06 End Using
The changes to the cust entity must be saved. If an exception is thrown, the application must retry the save 3 times.
You need to add a code segment to meet the requirements.
Which code segment should you insert at line 05?
A. While (count < 3)
Try
context.SaveChanges()
Exit While
Catch ex As Exception
End Try
count += 1
End While
B. While (cust.EntityState = EntityState.Modified) Try
context.SaveChanges()
Catch ex As Exception
count += 1
If (count > 2 AndAlso context.Connection.State =
ConnectionState.Broken) Then
Throw New Exception()
End If
End Try
End While
C. While (True)
AddHandler context.SavingChanges, _
Function(o As System.Object, e As System.EventArgs) count += 1
If count > 2 Then
Throw New Exception()
End If
context.SaveChanges()
End Function
End While
D. While (context.ObjectStateManager.GetObjectStateEntry( _ cust).OriginalValues.IsDBNull(0))
count += 1
If (count > 2) Then
Exit While
End If
context.SaveChanges()
End While
Answer: B
QUESTION 268
You have an Entity Framework ObjectContext named Contextl. Contextl manages a class named Order.
You create the following code:
You need to ensure that any changes made to the Order parameter are saved correctly.
Which code segment should you insert at line 07?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
QUESTION 269
Drag and Drop Question
You are developing a Microsoft .NET Framework 4 application.
The application connects to a Microsoft SQL Server database.
You have the following stored procedure:
You have a custom class named CustomerDataContext that is derived from the DataContext class.
You need to use an instance of CustomerDataContext to update the database.
What code should you use? (To answer, drag the appropriate code segments to the correct locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Answer:
QUESTION 270
You use Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL Server 2008 database.
You add the following table to the database.
CREATE TABLE Orders(
ID numeric(18, 0) NOT NULL,
OrderNaroe varchac (50) NULL,
OrderTime time (7) NULL,
OrderDate dace NULL)
You write the following code to retrieve data from the OrderTime column. (Line numbers are included for reference only.)
01 Dim conn As SqlConnection = New SqlConnection(“”*”)
02 conn.Open()
03 Dim cmd As SqlCommand = New SqlCommand(
“SELECT ID, OrderTime FROM Orders”, conn)
04 Dim rdr As SqlDacaReader = crod.ExecuteReader() 06 While rdr.Read()
08 End While
You need to retrieve the OrderTime data from the database.
Which code segment should you insert at line 07?
A. Dim time As DateTime = DirectCast (rdr (1), DateTime)
B. Dim time As TimeSpan = DirectCast(rdr(1), TimeSpan)
C. Dim time As Timer = DirectCast(rdr(1), Timer)
D. Dim time As String = DirectCast(rdr(1), String)
Answer: B
Explanation:
Pay attention to the fact that it goes about Microsoft SQL Server 2008 in the question. Types date and time are not supported in Microsoft SQL Server Express.
time (Transact SQL)
(http://msdn.microsoft.com/en-us/library/bb677243.aspx)
Using date and time data
(http://msdn.microsoft.com/en-us/library/ms180878.aspx)
Date and time functions
(http://msdn.microsoft.com/en-us/library/ms186724.aspx)
SQL Server Data Type Mappings (ADO.NET)
(http://msdn.microsoft.com/en-us/library/cc716729.aspx)
Instant Download Braindump2go New Released Microsoft 70-516 Exam Dumps PDF & VCE! Enjoy 1 year Free Updation! 100% Exam Pass Guaranteed Or Full Money Back!
FREE DOWNLOAD: NEW UPDATED 70-516 PDF Dumps & 70-516 VCE Dumps from Braindump2go: http://www.braindump2go.com/70-516.html (286 Q&A)
Latest 70-516 Dumps PDF Free Download in Braindump2go 100% 70-516 Pass Guaranteed (251-260) [NEW UPDATED] [PDF&VCE]Braindump2go 70-341 Practice Tests Free Download
Comments are currently closed.