This page was exported from Braindump2go Free Exam Dumps with PDF and VCE Collection [ https://www.mcitpdump.com ] Export date:Tue May 7 11:22:32 2024 / +0000 GMT ___________________________________________________ Title: [2016 Mar.Latest]Braindump2go 70-516 Latest Dumps Free Download Pass 70-516 Exam 100% --------------------------------------------------- 2016 March NEW 70-516 Exam Questions Released!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 2016 NEW 70-516 Study Guides:1.Model data2.Manage connections and context3.Query data4.Manipulate data5.Develop and deploy reliable applications QUESTION 271You use Microsoft Visual Studio 2010 and Microsoft NET framework 4 to create an application the application uses the ADO NET entity framework to model entities.You define a Category class by writing the following code segment (Line numbers are included for reference only) Public Class Category01 Public Class Category02 Public Property CategorylDO As Integer03 Get04 End Get05 Set06 End Set07 End Property08 Public Property CategoryName() As String09 Get10 End Get11 Set12 End Set13 End Property14 Public Property Description() As String15 Get16 End Get17 Set18 End Set19 End Property20 Public Property Picture() As Byte()21 Get22 End Get23 Set24 End Set 2526 End PropertyYou need to add a collection named Products to the Category class.You also need to ensure that the collection supports deterred loading.Which code segment should you insert at line 25? A.    Public Shared Property Products() As List(Of Product) Get End GetSetEnd SetEnd PropertyB.    Public Oweindabte Properly Products() As bst(Of Product) Get End GetSetEnd SetEnd PropertyC.    Public UustOvemnde Properly Products() As bst (Of Produrt)D.    Protected Property Products() As IJst(Of Product) Get End GetSetEnd SetEnd Property Answer: B QUESTION 272You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.You are creating the data layer of the application.You write the following code segment. (Line numbers are included for reference only.)01Public Shared Function GetDataReader(sql As String) As SqlDataReader02Dim dr As SqlDataReader = Nothing04Return dr05End FunctionYou need to ensure that the following requirements are met:The SqlDataReader returned by the GetDataReader method can be used to retrieve rows from the database.SQL connections opened within the GetDataReader method will close when the SqlDataReader is closed.Which code segment should you insert at line 03? A.    Using cnn As New SqlConnection(strCnn)TryDim cmd As New SqlCommand(sql, cnn)cnn.Open()dr = cmd.ExecuteReader()CatchThrowEnd TryEnd UsingB.    Dim cnn As New SqlConnection(strCnn)Dim cmd As New SqlCommand(sql, cnn)cnn.Open()Trydr = cmd.ExecuteReader()Finallycnn.Close()End TryC.    Dim cnn As New SqlConnection(strCnn)Dim cmd As New SqlCommand(sql, cnn)cnn.Open()Trydr = cmd.ExecuteReader()cnn.Close()CatchThrowEnd TryD.    Dim cnn As New SqlConnection(strCnn)Dim cmd As New SqlCommand(sql, cnn)cnn.Open()Trydr = cmd.ExecuteReader(CommandBehavior.CloseConnection) Catchcnn.Close()ThrowEnd Try Answer: DExplanation:CommandBehavior.CloseConnection When the command is executed, the associated Connection object is closed when the associated DataReader object is closed.CommandBehavior Enumeration(http://msdn.microsoft.com/en-us/library/system.data.commandbehavior.aspx)SqlCommand.ExecuteReader Method (CommandBehavior)(http://msdn.microsoft.com/en-us/library/y6wy5a0f.aspx) QUESTION 273Hotspot QuestionYou create an Entity Data Model (EDM) named ModelContoso.You need to generate a Transact-SQL script to create a database to store ModelContoso. The solution must ensure that table names are prefixed automatically with TBL_.Which property of ModelContoso should you modify? (To answer, select the appropriate property in the answer area.) Answer:   QUESTION 274You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Microsoft Windows Forms application,You plan to deploy the application to several shared client computers.You write the following code segment. (Line numbers are included for reference only.)01 Dim config As Configuration = Conf igurationManager .OpenExeConf iguratlon(exeConf igName)03 config.Save()04 ...You need to encrypt the connection string stored in the .config file.Which code segment should you insert at line 02? A.    Dim section As ConnectionStringsSection _TryCast(config.GetSection("connectionString"), ConnectionStringsSection) section.Sectionlnformation.ProtectSection("DataProtectionConfigurationProvider")B.    Dim section As ConnectionStcingsSection =TryCast(config.GetSecion("connectionStrings"), ConnectionStringsSection)section.Sectionlnformation.ProtectSection("RsaProtectedConf igurationProvider")C.    Dim section As ConnectionStringsSection =TryCast(config.GetSection("connectionString") ConnectionStringsSection) section.Sectionlnformation.ProtectSection("RsaProtectedConfigurationProvider")D.    Dim section As ConnectionStringsSection =TryCast(config.GetSection("connectionStrings"), ConnectionStringsSection) section.Sectionlnformation.ProtectSection("DataProtectionConfigurationProvider") Answer: BExplanation:You encrypt and decrypt the contents of a Web.config file by using System.Configuration . DPAPIProtectedConfigurationProvider, which uses the Windows Data Protection API (DPAPI) to encrypt and decrypt data, or System.Configuration. RSAProtectedConfigurationProvider, which uses the RSA encryption algorithm to encrypt and decrypt data. When you use the same encrypted configuration file on many computers in a Web farm, only System.Configuration.RSAProtectedConfigurationProvider enables you to export theencryption keys that encrypt the data and import them on another server. This is the default setting.CHAPTER 2 ADO.NET Connected ClassesLesson 1: Connecting to the Data StoreStoring Encrypted Connection Strings in Web Applications (page 76)Securing Connection Strings(http://msdn.microsoft.com/en-us/library/89211k9b(v=vs.80).aspx) QUESTION 275Drag and Drop QuestionYou have an application that queries a Microsoft Access database. The database contains a table named Tablel. Tablel contains a column named Columnl. A variable named Variablel is used to store a user input string.You need to retrieve the rows from Tablel if the value in Columnl is equal to Variablel. The solution must protect against a SQL injection attack.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 276You use Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL Server 2008 database.You add the following stored procedure to the database.CREATE PROCEDURE GetSalesPeopleASBEGINSELECT FirstName, LastName, Suffix, Email, PhoneFROM SalesPeopleENDYou write the following code. (Line numbers are included for reference only.)01Dim connection As SqlConnection = New SqlConnection("& ")02Dim command As SqlCommand = New SqlCommand("GetSalesPeople", connection)03command.CommandType = CommandType.StoredProcedureYou need to retrieve all of the results from the stored procedure.Which code segment should you insert at line 04 A.    Dim res = command.ExecuteReader()B.    Dim res = command.ExecuteScalar()C.    Dim res = command.ExecuteNonQuery()D.    Dim res = command.ExecuteXmlReader() Answer: AExplanation:ExecuteReader Sends the CommandText to the Connection and builds a SqlDataReader.SqlCommand Class(http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.aspx) QUESTION 277Drag and Drop QuestionYou use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database. You have the following stored procedure: You need to return a list of customers who match a given order date. The solution must meet the following requirements:Use a forward-only data object.Use a read-only data object.What should you do? (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 278You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application contains the following XML document.< feed >< title > Products < /title >< entry >< title > Entry title 1 < /title >< author > Author1 < /title >< content >< properties >< description > some description < /description >< n otes > some notes < /notes >< comments > some comments < /comments >< /properties >< /content >< /entry >...< /feed >You plan to add localization features to the application.You add the following code segment. (Line numbers are included for reference only.)01Public Function GetTextNodesForLocalization(doc As XDocument) As IEnumerable(Of XNode)03Return From n In nodes _04Where n.NodeType = XmlNodeType.Text _05 Select n06End FunctionYou need to ensure that the GetTextNodesForLocalization method returns all the XML text nodes of the document.Which code segment should you insert at line 02? A.    Dim nodes As IEnumerable(Of XNode) = doc.Descendants()B.    Dim nodes As IEnumerable(Of XNode) = doc.Nodes()C.    Dim nodes As IEnumerable(Of XNode) = doc.DescendantNodes()D.    Dim nodes As IEnumerable(Of XNode) = doc.NodesAfterSelf() Answer: CExplanation:DescendantNodes() Returns a collection of the descendant nodes for this document or element, in document order.Descendants() Returns a collection of the descendant elements for this document or element, indocument order.Nodes() Returns a collection of the child nodes of this element or document, in document order.NodesAfterSelf() Returns a collection of the sibling nodes after this node, in document order. QUESTION 279Drag and Drop QuestionYou have a Cable named Tablel that contains two columns named Columnl and Column2. Columnl contains string data. Column2 contains image files.You create the following code: What code should you use? (To answer, drag the appropriate elements to the correct locations. Each element 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 280You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application. You use the ADO.NET Entity Framework Designer to model entities.You need to associate a previously deserialized entity named personl to an object context named model and persist changes to the database.Which code segment should you use? A.    personl.AcceptChanges() model.SaveChanges()B.    model.People.Attach(personl) model.SaveChanges()C.    model.AttachTo("People", personl) model.SaveChanges()D.    model.People.ApplyChanges(personl) model.SaveChanges() Answer: CExplanation:Cosiderations from Attaching and Detaching objects (http://msdn.microsoft.com/en-us/library/bb896271.aspx):The object that is passed to the Attach method must have a valid EntityKey value. If the object does not have a valid EntityKey value, use the AttachTo method to specify the name of the entity set.Attach Use the Attach method of ObjectContext where the method accepts a single typed entity parameter.AttachTo The AttachTo method of ObjectContext accepts two parameters. The first parameter is a string containing the name of the entity set.The second parameter' type is object and references the entity you want to add.Attach The Attach method of ObjectSet, which is the entity set' type, accepts a single typed parameter containing the entity to be added to the ObjectSet.CHAPTER 6 ADO.NET Entity FrameworkLesson 2: Querying and Updating with the Entity FrameworkAttaching Entities to an ObjectContext(page 437)Attaching and Detaching objects(http://msdn.microsoft.com/en-us/library/bb896271.aspx)http://msdn.microsoft.com/en-us/library/bb896248(v=vs.90).aspxhttp://msdn.microsoft.com/en-us/library/bb896248.aspx QUESTION 281Drag and Drop QuestionYou are developing a Windows Forms application.The application uses data from Microsoft SQL Server.You have the following code: You need to identify the connection pools used by connections and connection?What should you identify? (To answer, drag the appropriate configurations to the correct connections pools. Each configuration m 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 282You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.The application connects to a Microsoft SQL Server database. The application uses Entity Framework to access data.You need to use Entity SQL to query data from an object of type ObjectContext.Which method should you use first? A.    ExecuteStoreCommandB.    ExecuteStoreQueryC.    CreateObjectD.    CreateQuery Answer: D QUESTION 283Drag and Drop QuestionYou plan to generate the following Transact-SQL script from an Entity Data Model (EDM) by using the Entity Framework Designer: You create an entity named Employee.You need to identify the data types for the properties of the Employee entity.What should you identify? (To answer, drag the appropriate data types to the correct statements. Each data type 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 284You u Microsoft `Visual Studio 2010 and Microsoft NET Framework 410 create a Windows Communication Foundation (`ACF) Data Services serviceYou deploy the service b the following URL http://contoso.comlNorthwtnd.svc.You want to query the WCF Data Services service to retneve a list at customer objects You need to ensure that the query meets the following requirements. "Only customers that match the following filter criteria are retrieved City=Seatttle AND Level > 200 "Data sorted in ascending order by the ContactName arid Address properties.Which URL should you use for the query'? A.    http://contoso.comNorthwind.svc/Customers?City=SeattIe & Level gt 200 & Sordeby=ContactName,AddressB.    http://contoso.comNorthwind.svc/Customers?City=SeattIe & Level gt 200 & Sordeby=ContactName,AddressC.    http://contoso.comNorthwind.svc/Customers?City eq `Seattle aid Level gt 200 & Sordeby=ContactName,AddressD.    http://contoso.comNorthwind.svc/Customers?City eq `Seattle' aid Level gt 200 & Sordeby=ContactName,Address Answer: C QUESTION 285Drag and Drop QuestionYou 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 286Drag and Drop QuestionYou are developing a transactional application that debits customer accounts.The application tracks account data in a local Microsoft SQL Server database and a web service.You need to ensure that the transaction rolls back the operation in the local database and in the web service if an exception occurs.What should you do? (To answer, drag the appropriate elements to the correct locations. Each element 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: 2016 NEW 70-516 Exam Questions & 70-516 Dumps PDF 286Q Full Version Free Shared by Braindump2go:http://www.braindump2go.com/70-516.html --------------------------------------------------- Images: --------------------------------------------------- --------------------------------------------------- Post date: 2016-03-11 07:53:23 Post date GMT: 2016-03-11 07:53:23 Post modified date: 2016-03-11 07:53:23 Post modified date GMT: 2016-03-11 07:53:23 ____________________________________________________________________________________________ Export of Post and Page as text file has been powered by [ Universal Post Manager ] plugin from www.gconverters.com