[Braindump2go] Free 70-516 Exam Dumps PDF Download (61-70)
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 VCE&70-516 PDF Dumps: http://www.braindump2go.com/70-516.html (286 Q&As)
We never believe in second chances and Braindump2go brings you the best 70-516 Exam Preparation Materials which will make you pass in the first attempt.We guarantee all questions and answers in our 70-516 Dumps are the latest released,we check all exam dumps questions from time to time according to Microsoft Official Center, in order to guarantee you can read the latest questions!
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 71
The application user interface displays part names or color names in many plases as ‘## Name ##’.
You need to provide a method named FormattedName() to format part names and color names throughout the application.
What should you do?
A. Add the following code segment to the ExtensionMethods class in ExtensionMethods.cs:
public static string FormattedName (this IName entity)
{
return string.Format(“## {0} ##”, entity.Name)
}
B. Add the following code segment to the ExtensionMethods class in ExtensionMethods.cs:
public static string FormattedName (this Color entity)
{
return string.Format(“## {0} ##”, entity.Name)
}
C. Add the following code segment to the ExtensionMethods class in ExtensionMethods.cs:
public static string FormattedName (this Part entity)
{
return string.Format(“## {0} ##”, entity.Name)
}
D. Add the following code segmend to the Color class in Color.cs:
public string FormattedName()
{
return string.Format(“## {0} ##”, this.Name);
}
E. Add the following code segmend to the Part class in Part.cs:
public string FormattedName()
{
return string.Format(“## {0} ##”, this.Name);
}
Answer: A
QUESTION 72
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 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 MemoryStream stream = new MemoryStream();
02 var query = context.Contacts.Include(“SalesOrderHeaders.SalesOrderDetails”);
03 var contact = query.Where(“it.LastName = @lastname”, new ObjectParameter(“lastname”, 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. var formatter = new XmlSerializer(typeof(Contact), new Type[]
{
typeof(SalesOrderHeader),
typeof(SalesOrderDetail)
});
formatter.Serialize(stream, contact);
B. var formatter = new XmlSerializer(typeof(Contact));
formatter.Serialize(stream, contact);
C. var formatter = new BinaryFormatter();
formatter.Serialize(stream, contact);
D. var 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)
QUESTION 73
The entity data model must be configured to provide a way you cal the sp_FindObsolete stored procedure.
The returned data must implement the Descendants property.
In Visual Studio 2010, you open the Add functions Import dialog box from the EDMX diagram and enter the information shown in the following graphic.
You need to complete the configuration in the dialog box.
What should you do?
A. Click the Get Column Information button, click Create New Complex Type and then, in the
Complex box, enter Parts.
B. In the Returns a Collection Of area, click Scalars and then, in the Scalars list, click string
C. In the Returns a Collection Of area, click Entities and then, in the Entities list, click
Component
D. In the Returns a Collection Of area, click Scalars and then, in the Scalars list, click Int32
Answer: C
QUESTION 74
You use Microsoft Visual Studio 2010 to create a Microsoft .NET Framework 4.0 application.
You create an Entity Data Model for the database tables shown in the following diagram.
You need to modify the .edmx file so that a many-to-many association can exist between the Address and Customer entities.
Which storage Model section of the .edmx file should you include?
A. <EntityType Name=”CustomerAddress”>
<Key>
<PropertyRef Name=”CustomerAddressID” />
<PropertyRef Name=”CustomerID” />
<PropertyRef Name=”AddressID” />
</Key>
<Property Name=”CustomerAddressID” Type=”int”
Nullable=”false” StoreGeneratedPattern=”Identity” />
<Property Name=”CustomerID” Type=”int” Nullable=”false”/>
<Property Name=”AddressID” Type=”int” Nullable=”false”/>
<Property Name=”AddressType” Type=”nvarchar”
Nullable=”false” MaxLength=”50″/>
</EntityType>
B. <EntityType Name=”CustomerAddress”>
<Key>
<PropertyRef Name=”CustomerID” />
<PropertyRef Name=”AddressID” />
</Key>
<Property Name=”CustomerID” Type=”int” Nullable=”false” />
<Property Name=”AddressID” Type=”int” Nullable=”false” />
<Property Name=”AddressType” Type=”nvarchar”
Nullable=”false” MaxLength=”50″ DefaultValue=”Home” />
</EntityType>
C. <EntityType Name=”CustomerAddress”>
<Key>
<PropertyRef Name=”CustomerAddressID” />
</Key>
<Property Name=”CustomerAddressID” Type=”int”
Nullable=”false” StoreGeneratedPattern=”Identity” />
<Property Name=”CustomerID” Type=”int” Nullable=”false”/>
<Property Name=”AddressID” Type=”int” Nullable=”false” />
<Property Name=”AddressType” Type=”nvarchar”
Nullable=”false” MaxLength=”50″/>
</EntityType>
D. <EntityType Name=”CustomerAddress”>
<Key>
<PropertyRef Name=”CustomerID” />
<PropertyRef Name=”AddressID” />
</Key>
<Property Name=”CustomerID” Type=”int” Nullable=”false”/>
<Property Name=”AddressID” Type=”int” Nullable=”false”/>
<Property Name=”AddressType” Type=”nvarchar”
Nullable=”false” MaxLength=”50” />
</EntityType>
Answer: D
QUESTION 75
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application.
You 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. Change the Code Generation Strategy option from Default to None.
B. Change the Transform Related Text Templates On Save option to False.
C. Add an ADO.NET Self-Tracking Entity Generator to the model.
D. Add an ADO.NET EntityObject Generator to the model.
Answer: C
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)
QUESTION 76
You are developing an ADO.NET 4.0 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)
QUESTION 77
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application connects to several SQL Server databases.
You create a function that modifies customer records that are stored in multiple databases.
All updates for a given record are performed in a single transaction.
You need to ensure that all transactions can be recovered.
What should you do?
A. Call the RecoveryComplete method of the TransactionManager class.
B. Call the EnlistDurable method of the Transaction class.
C. Call the Reenlist method of the TransactionManager class.
D. Call the EnlistVolatile method of the Transaction class.
Answer: B
Explanation:
Enlisting Resources as Participants in a Transaction
(http://msdn.microsoft.com/en-us/library/ms172153.aspx)
Implementing a Resource Manager
(http://msdn.microsoft.com/en-us/library/ms229975.aspx)
Committing a Transaction in Single-Phase and Multi-Phase
(http://msdn.microsoft.com/en-us/library/ckawh9ct.aspx)
Resource managers with a durable enlistment must be able to perform recovery if they experience a failure.
Implementing a Resource Manager
(http://msdn.microsoft.com/en-us/library/ms229975.aspx)
TransactionManager.Reenlist() Reenlists a durable participant in a transaction.
A resource manager facilitates resolution of durable enlistments in a transaction by reenlisting the transaction participant after resource failure.
Transaction.EnlistVolatile() Enlists a volatile resource manager to participate in a transaction. Volatile resource managers cannot recovery from failure to complete a transaction in which they were participating. For more information on volatile and durable resources, as well as how to enlist a resource, see Implementing A Resource Manager. Transaction.EnlistDurable() Enlists a durable resource manager to participate in a transaction.
TransactionManager.RecoveryComplete() Notifies the transaction manager that a resource manager recovering from failure has finished reenlisting in all unresolved transactions. All durable resource managers should do recovery when they first start up by calling the Reenlist method for each outstanding transaction.
Only when all of the reenlistments are done should the resource manager call RecoveryComplete.
TransactionManager.Reenlist() Method
(http://msdn.microsoft.com/en-us/library/system.transactions.transactionmanager.reenlist.aspx)
Transaction.EnlistVolatile() Method
(http://msdn.microsoft.com/en-us/library/system.transactions.transaction.enlistvolatile.aspx)
Transaction.EnlistDurable()
(http://msdn.microsoft.com/en-us/library/system.transactions.transaction.enlistdurable.aspx)
TransactionManager.RecoveryComplete() Method
(http://msdn.microsoft.com/en-us/library/system.transactions.transactionmanager.recoverycomplete.aspx)
QUESTION 78
You are developing a WCF data service that will expose an existing Entity Data Model (EDM).
You have the following requirements:
– Users must be able to read all entities that are exposed in the EDM.
– Users must be able to update or replace the SalesOrderHeader entities.
– Users must be prevented from inserting or deleting the SalesOrderHeader entities
You need to ensure that the data service meets the requirements.
Which code segment should you use in the Initialize method?
A. config.SetEntitySetAccessRule(“*”, EntitySetRights.AllRead);
config.SetEntitySetAccessRule(“SalesOrderHeader”,
EntitySetRights.AllWrite);
B. config.SetEntitySetAccessRule(“*”, EntitySetRights.AllRead);
config.SetEntitySetAccessRule(“SalesOrderHeader”,
EntitySetRights.WriteMerge |
EntitySetRights.WriteReplace);
C. config.SetEntitySetAccessRule(“*”, EntitySetRights.AllRead);
config.SetEntitySetAccessRule(“SalesOrderHeader”,
EntitySetRights.WriteAppend |
EntitySetRights.WriteDelete);
D. config.SetEntitySetAccessRule(“*”, EntitySetRights.AllRead);
config.SetEntitySetAccessRule(“SalesOrderHeader”,
EntitySetRights.All);
Answer: B
Explanation:
http://msdn.microsoft.com/en-us/library/system.data.services.entitysetrights.aspx
http://msdn.microsoft.com/en-us/library/ee358710.aspx
QUESTION 79
You use Microsoft .NET Framework 4.0 to develop an application that uses LINQ to SQL.
The LINQ to SQL model contains the Product entity.
A stored procedure named GetActiveProducts performs a query that returns the set of active products from the database.
You need to invoke the stored procedure to return the active products, and you must ensure that the LINQ to SQL context can track changes to these entities.
What should you do?
A. Select the Product entity, view the entity’s property window, and change the Name for the
entity to GetActiveProducts.
B. Add a property named GetActiveProducts to the Product entity.
C. Navigate to the GetActiveProducts stored procedure in Server Explorer, and drag the
procedure onto the Product entity in the LINQ to SQL model designer surface.
D. Select the Product entity, view the entity’s property window, and change the Source for the
entity to GetActiveProducts.
Answer: C
Explanation:
http://weblogs.asp.net/scottgu/archive/2007/08/16/linq-to-sql-part-6-retrieving-data-using-stored-procedures.aspx
QUESTION 80
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application.
You use the ADO.NET Entity Framework Designer to model entities.
You retrieve an entity from an object context.
A different application updates the database.
You need to update the entity instance to reflect updated values in the database.
Which line of code should you use?
A. context.Refresh(RefreshMode.StoreWins, entity);
B. context.LoadProperty(entity, “Client”, MergeOption.OverwriteChanges);
C. context.AcceptAllChanges() ;
D. context.LoadProperty(entity, “Server”, MergeOption.OverwriteChanges);
Answer: A
Explanation:
LoadProperty(Object, String) Explicitly loads an object related to the supplied object by the specified navigation property and using the default merge option. AcceptAllChanges Accepts all changes made to objects in the object context. Refresh(RefreshMode, Object) Updates an object in the object context with data from the data source.
ObjectContext.Refresh Method (RefreshMode, Object)
(http://msdn.microsoft.com/en-us/library/bb896255.aspx)
Thanks For Trying Braindump2go Latest Microsoft 70-516 Dumps Questions! Braindump2go Exam Dumps ADVANTAGES:
☆ 100% Pass Guaranteed Or Full Money Back!
☆ Instant Download Access After Payment!
☆ One Year Free Updation!
☆ Well Formated: PDF,VCE,Exam Software!
☆ Multi-Platform capabilities – Windows, Laptop, Mac, Android, iPhone, iPod, iPad.
☆ Professional, Quick,Patient IT Expert Team 24/7/3286 Onlinen Help You!
☆ We served more than 35,000 customers all around the world in last 5 years with 98.99% PASS RATE!
☆ Guaranteed Secure Shopping! Your Transcations are protected by Braindump2go all the time!
☆ Pass any exams at the FIRST try!
FREE DOWNLOAD: NEW UPDATED 70-516 PDF Dumps & 70-516 VCE Dumps from Braindump2go: http://www.braindump2go.com/70-516.html (286 Q&A)