Point Checklist: cbt nuggets 70-516 free download

Free of 70-516 training materials and vce for Microsoft certification for IT learners, Real Success Guaranteed with Updated 70-516 pdf dumps vce Materials. 100% PASS TS: Accessing Data with Microsoft .NET Framework 4 exam Today!

2021 Oct 70-516 amazon:

Q71. - (Topic 3) 

You use microsoft visual studio 2010 and microsoft .net framework 4 to create an application that connects to a database by using the entity framework. you create an entity data model (edm) by using the generate from database wizard for the following tables. 

You need to ensure that the edm contains an entity type named employee that contains all of the data from both tables. 

What should you do? 

A. Delete the employeeaccess entity, create a new property named canaccessbuildings on the employee entity, and add a mapping for the new property. 

B. Create an inheritance relationship between the employee and employeeaccess entities, and use canaccessbuildings as an inheritance condition. 

C. Modify the .edmx file to include the following line of code. <novigationpropecty name"type" FromRole" "EmployeeAccess" ToRole="Employee" /> 

D. Create a one-to-one association named AcanAccessBuildingsAssociation between the EmployeeAccess entity and the employee entity. 

Answer: A 


Q72. - (Topic 3) 

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Communication Foundation (WCF) Data Services service. The service connects to a Microsoft SQL Server 2008 database. The service is hosted by an Internet Information Services (IIS) 6.0 server. 

You need to ensure that applications authenticate against user information stored in the database before the application is allowed to use the service. 

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) 

A. Configure IIS to require Windows authentication. 

B. Configure IIS to allow anonymous access. 

C. Configure IIS to require basic authentication. 

D. Enable the WCF Authentication Service. 

E. Modify the Data Services service to use a Microsoft ASP.NET membership provider. 

Answer: B,E 


Q73. - (Topic 5) 

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database. 

You create the classes shown in the following exhibit. 

You add the following code segment to the application. (Line numbers are included for reference only.) 

A. var query = leagues.Select(l => l.Teams.Select(t => t.Players)); 

B. var query = leagues.Select(l => l.Teams.SelectMany(t => t.Players)); 

C. var query = leagues.SelectMany(l => l.Teams.SelectMany(t => t.Players)); 

D. var query = leagues.SelectMany(l => l.Teams.Select(t => t.Players)); 

Answer: C 


Q74. - (Topic 3) 

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application that uses the Entity Framework. Entity types in the model are generated by the Entity Data Model generator tool (EdmGen.exe). 

You write the following code. (Line numbers are included for reference only.) 

01 Dim stream As MemoryStream = New HemoryStream() 

02 Dim query = context.Contacts.Include( 

"SalesOrderHeaders.SaiesOrderDetails") 

03 Dim contact = query.Where("it.LastName - Slostname", 

New ObjectParameter("lastnarae", lastName)).First() 04 

You need to serialize the contact and all of its related objects to the MemoryStream so that the contact can be deserialized back into the model. 

Which code segment should you insert at line 04? 

A. Dim formatter - New XmlSerializer(GetType(Contact), New Type() (GetType(SalesOrderHeader), GetType(SalesOrderDetail)}) formatter-Serialize(stream, contact) 

B. Dim formatter = New BinaryFormatter() formatter.Serialize(stream, contact) 

C. Dim formatter = New XmlSerializer(GetType(Contact)) formatter.Serialize(stream, contact) 

D. Dim formatter = New SoapFormatter() formatter-Serialize(stream, contact) 

Answer: A 

Explanation: 

public XmlSerializer(Type type, Type[] extraTypes) 

Initializes a new instance of the System.Xml.Serialization.XmlSerializer class that can 

serialize objects of the specified type into XML documents, 

and deserialize XML documents into object of a specified type. If a property or field returns 

an array, the extraTypes parameter specifies objects 

that can be inserted into the array. 

type: 

The type of the object that this System.Xml.Serialization.XmlSerializer can 

serialize.extraTypes: 

A System.Type array of additional object types to serialize. 

XmlSerializer Constructor (Type, Type[]) 

(http://msdn.microsoft.com/en-us/library/e5aakyae.aspx) 


Q75. - (Topic 3) 

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application. Vou use the ADO.NET Entity Framework Designer to model entities. 

You need to ensure that the entities are self-tracking. 

What should you do in the ADO.NET Entity Framework Designer? 

A. Add an ADO.NET EntityObjecl Generator to the model. 

B. Change the Transform Related Text Templates On Save option to False. 

C. Change the Code Generation Strategy option from Default to None. 

D. Add an ADO.NET Self-Tracking Entity Generator to the model. 

Answer: D 

Explanation: 

The ADO.NET Self-Tracking Entity Generator text template generates the object-layer 

code that consists of a custom typed ObjectContext and entity classes that contain self-

tracking state logic so that the entities themselves keep track of their state instead of 

ObjectContext doing so. 

Probably the best usage of self-tracking entities is when working with N-tier applications. 

CHAPTER 6 ADO.NET Entity Framework 

Lesson 1: What Is the ADO.NET Entity Framework? 

The Self-Tracking Entity Generator (page 405) 

ADO.NET Self-Tracking Entity Generator Template 

(http://msdn.microsoft.com/en-us/library/ff477604.aspx) 


70-516  training

Refresh 70-516 how many questions:

Q76. - (Topic 1) 

You 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 the ADO.NET Entity Framework to manage order data. The application makes a Web service call to obtain orders from an order-tracking system. 

You need to ensure that the orders are added to the local data store. 

Which method should you call on the ObjectContext? 

A. Attach 

B. AttachTo 

C. AddObject 

D. ApplyCurrentValues 

Answer: C 

Explanation: 

ObjectContext.AddObject() Call AddObject on the ObjectContext to add the object to the 

object context. 

Do this when the object is a new object that does not yet exist in the data source. 

ObjectContext.Attach() Call Attach on the ObjectContext to attach the object to the object 

context. 

Do this when the object already exists in the data source but is currently not attached to the 

context. 

If the object being attached has related objects, those objects will also be attached to the 

object context. 

Objects are added to the object context in an unchanged state. 

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. 

ObjectContext.AttachTo() Call AttachTo on the ObjectContext to attach the object to a 

specific entity set in the object context or if the object has a null (Nothing in Visual Basic) 

EntityKey value. 

The object being attached is not required to have an EntityKey associated with it. If the 

object does not have an entity key, then entitySetName cannot be an empty string. 

ApplyCurrentValues<TEntity>() method is used to apply changes that were made to objects outside the ObjectContext, such as detached objects that are received by a Web service. The method copies the scalar values from the supplied object into the object in the ObjectContext that has the same key. You can use the EntityKey of the detached object to retrieve an instance of this object from the data source. 


Q77. - (Topic 1) 

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. 

You manually create your own Context class named AdventureWorksDB that inherits from Object Context. 

You need to use Adventure WorksDB to invoke a stored procedure that is defined in the data source. 

Which method should you call? 

A. Translate 

B. ExecuteFunction 

C. ExecuteStoreQuery 

D. ExecuteStoreCommand 

Answer: B 

Explanation: 

ExecuteFunction(String, ObjectParameter[]) Executes a stored procedure or function that is 

defined in the data source and expressed in the conceptual model; 

discards any results returned from the function; and returns the number of rows affected by 

the execution. 

ExecuteStoreCommand() Executes an arbitrary command directly against the data source 

using the existing connection. 

ExecuteStoreQuery<TElement>(String, Object[]) Executes a query directly against the data 

source that returns a sequence of typed results. 

Translate<TElement>(DbDataReader) Translates a DbDataReader that contains rows of 

entity data to objects of the requested entity type. 

ObjectContext.ExecuteFunction Method 

(http://msdn.microsoft.com/en-us/library/dd986915.aspx) 


Q78. - (Topic 3) 

You 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. The application includes two ObjectContext instances named context1 and context2. 

You need to persist the changes in both object contexts within a single transaction. Which code segment should you use? 

A. using (TransactionScope scope = new TransactionScope()) 

context1.SaveChanges(); 

context2.SaveChanges(); 

B. using (TransactionScope scope = new TransactionScope()) 

context1.SaveChanges(); 

context2.SaveChanges(); 

scope.Complete(); 

C. using (TransactionScope scope = new TransactionScope()) 

using (TransactionScope scope1 = new 

TransactionScope(TransactionScopeOption.RequiresNew)) 

context1.SaveChanges(); 

scope1.Complete(); 

using (TransactionScope scope2 = new 

TransactionScope(TransactionScopeOption.RequiresNew)) 

context2.SaveChanges(); 

scope2.Complete(); 

scope.Complete(); 

D. using (TransactionScope scope = new TransactionScope()) 

using (TransactionScope scope = new 

TransactionScope(TransactionScopeOption.RequiresNew)) 

context1.SaveChanges(); 

using (TransactionScope scope = new 

TransactionScope(TransactionScopeOption.RequiresNew)) 

context2.SaveChanges(); 

Answer: B 

Explanation: 

TransactionScope.Complete Indicates that all operations within the scope are completed successfully. 

TransactionScope Class (http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx) 


Q79. - (Topic 3) 

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 database includes a table that contains information about all the employees. The database table has a field named EmployeeType that identifies whether an employee is a Contractor or a Permanent employee. 

You declare the Employee entity base type. 

You create a new Association entity named Contractor that inherits the Employee base type. 

You need to ensure that all Contractors are bound to the Contractor class. 

What should you do? 

A. Modify the .edmx file to include the following line of code. <Condition ColumnName="EmployeeType" Value="Contractor" /> 

B. Use the Entity Data Model Designer to set up a referential constraint between the primary key of the Contractor class and EmployeeType. 

C. Modify the .edmx file to include the following line of code. 

<NavigationProperty Name="Type" FromRole="EmployeeType" ToRole="Concraccor" /> 

D. Use the Entity Data Model Designer to set up an association between the Contractor 

class and EmployeeType. 

Answer: A 

Explanation: 

<Association Name="FK_OrderDetails_Orders1"> 

<End Role="Orders" Type="StoreDB.Store.Orders" Multiplicity="1"> 

<OnDelete Action="Cascade" /> 

</End> 

<End Role="OrderDetails" Type="StoreDB.Store.OrderDetails" Multiplicity="*" /> 

<ReferentialConstraint> 

<Principal Role="Orders"> 

<PropertyRef Name="ID" /> 

</Principal> 

<Dependent Role="OrderDetails"> 

<PropertyRef Name="OrderId" /> 

</Dependent> 

</ReferentialConstraint> 

</Association> 


Q80. - (Topic 3) 

You are developing an ADO.NET 4 application that interacts with a Microsoft SQL Server 2008 server through the SQL Server Native Client. You create a trace DLL registry entry and you register all of the trace schemas. 

You need to trace the application data access layer. 

Which control GUID file should you use? 

A. ctrl.guid.snac10 

B. ctrl.guid.mdac 

C. ctrl.guid.adonet 

D. ctrl.guid.msdadiag 

Answer: A 

Explanation: 

ctrl.guid.adonet - ADO.NET only ctrl.guid.msdadiag - MSDADIAG only ctrl.guid.snac10 - SQL Server Native Client Providers only (SQL Server 2008) ctrl.guid.mdac - Windows Data Access Components (formerly Microsoft Data Access Components) on Windows 7 only Data Access Tracing in SQL Server 2008 (http://msdn.microsoft.com/en-us/library/cc765421.aspx) 



see more http://www.2passeasy.com/exam/70-516/