web analytics

Braindump2go Free Microsoft Dumps Questions Collection

Latest Real Exam Questions and Answers to help you pass Microsoft and other Hot exam 100%!

2015 Latest Updated 70-516 VCE Free Download from Braindump2go (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)

The 70-516 Exam Practice Questions and Answers are ideal for the aspring candiates to grab exceptional grades in Microsoft 70-516 Exam! The 70-516 Questions and Answers are developed using the latest updated course content and all the answers are verified to ensure phenoment preparation for the actual 70-516 Exam!

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 61
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that connects to a Microsoft SQL Server 2008 database.
You add the following table to the database.
CREATE TABLE ObjectCache (
Id INT IDENTITY PRIMARY KEY,
SerializedObjectData XML)
You write the following code segment to retreive records from the ObjectCache table. (Line numbers are included for reference only.)
01 string s = GetConnectionStringFromConfigFile(“xmldb”);
02 using (SqlConnection conn = new SqlConnection(s))
03    using (SqlCommand cmd = new SqlCommand(“select * from ObjectCache”, conn))
04    {
05       conn.Open();
06       SqlDataReader rdr = cmd.ExecuteReader();
07       while(rdr.Read())
08       {
09          …
10          DeserializeObject(obj);
11       }
12    }
You need to retreive the data from the SerializedObjectData column and pass it to a method named DeserializeObject.
Which line of code should you insert at line 09?

A.XmlReader obj  = (XmlReader)rdr[1];

B.SByte obj = (SByte)rdr[1];

C.String obj = (String)rdr[1];

D.Type obj = (Type)rdr[1];

Answer: C

QUESTION 62
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
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 localization features to the application.
You add the following code segment. (Line numbers are included for reference only.)
01 public IEnumerable <XNode> GetTextNodesForLocalization(XDocument doc)
02 {
03    …
04    return from n in nodes
05           where n.NodeType = XmlNodeType.Text
06           select n;
07 }
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 line 03?

A.IEnumerable <XNode> nodes = doc.Descendants();

B.IEnumerable <XNode> nodes = doc.Nodes();

C.IEnumerable <XNode> nodes = doc.DescendantNodes();

D.IEnumerable <XNode> nodes = doc.NodesAfterSelf();

Answer: C
Explanation:
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, in
document 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 63
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.
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.RequireNew))
  {
    context1.SaveChanges();
    scope1.Complete();
  }
  using (TransactionScope scope2 =
new TransactionScope(TransactionScopeOption.RequireNew))
  {
    context2.SaveChanges();
    scope2.Complete();
  }
  scope.Complete();
}

D.using (TransactionScope scope = new TransactionScope())
{
  using (TransactionScope scope1 =
new TransactionScope(TransactionScopeOption.RequireNew))
  {
    context1.SaveChanges();
  }
  using (TransactionScope scope2 =
new TransactionScope(TransactionScopeOption.RequireNew))
  {
    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)

QUESTION 64
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.
The application includes self-tracking entities as shown in the following diagram.
There is a Person entity names person1 that has TrackChanges turned on.
You need to delete all e-mail addresses that are associated with person1 by using an ObjectContext.
What are two possible code segments that you can use to achieve this goal? (Each correct answer presents a complete solution. Choose two).

A.foreach(var email in person1.EMailAddresses){
email.MarkAsDeleted();
}
context.SaveChanges();

B.while(person1.EMailAddresses.Count>0){
person1.EmailAddresses.RemoveAt(0);
}
context.SaveChanges();

C.person1.EMailAddresses = null;
context.SaveChanges();

D.person1.EMailAddresses = new TrackableCollection<EMailAddress>();
context.SaveChanges();

Answer: AB
Explanation:
Working with Self-Tracking Entities
(http://msdn.microsoft.com/en-us/library/ff407090.aspx)
Working with Sets of Self-Tracking Entities
(http://blogs.msdn.com/b/adonet/archive/2010/06/02/working-with-sets-of-self-tracking-entities.aspx)

QUESTION 65
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that uses LINQ to SQL.
You create a data model name AdvWorksDataContext, and you add the Product table to the data model.
The Product table contains a decimal column named ListPrice and a string column named Color.
You need to update ListPrice column where the product color is Black or Red.
Which code segment should you use?

A.string[] colorList = new string[] {“Black”, “Red”};
AdvWorksDataContext dc =  new AdvWorksDataContext();
var prod = from p in dc.Products
          where colorList.Contains(p.Color)
          select p;
foreach(var product in prod){
product.ListPrice = product.StandardCost * 1.5M;
}
dc.SubmitChanges();

B.AdvWorksDataContext dc =  new AdvWorksDataContext(“…”);
var prod = from p in dc.Products
          select p;
var list = prod.ToList();
foreach(Product product in list){
if(product.Color == “Black, Red”){
product.ListPrice = product.StandardCost * 1.5M;
}
}
dc.SubmitChanges();

C.AdvWorksDataContext dc =  new AdvWorksDataContext(“…”);
var prod = from p in dc.Products
          where p.Color == “Black, Red”
          select p;
foreach(var product in prod){
product.ListPrice = product.StandardCost * 1.5M;
}
dc.SubmitChanges();

D.AdvWorksDataContext dc =  new AdvWorksDataContext(“…”);
var prod = from p in dc.Products
          select p;
var list = prod.ToList();
foreach(Product product in list){
if((product.Color == “Black) && (product.Color == “Red”)){
product.ListPrice = product.StandardCost * 1.5M;
}
}
dc.SubmitChanges();

Answer: A

QUESTION 66
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
You create an Entity Data Model (EDM) by using the Microsoft ADO.NET Entity Data Model Designer (Entity Designer).
The EDM contains a complex type.
You need to map a stored procedure to the complex type by using the Entity Designer.
What should you do?

A.Add an association to the stored procedure.

B.Add a code generation item that has the name of the stored procedure.

C.Add a function import for the stored procedure.

D.Add an entity that mirrors the properties of the complex type.

Answer: C

QUESTION 67
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The configuration file contains the following code segment.
<configuration>
<connectionStrings>
<add name=”AdventureWorksLT”
        connectionString=”DataSource=SQL01;InitialCatalog=AdventureWorksLT;IntegratedSecurity=True;”
providerName=”System.Data.SqlClient”/>
</connectionStrings>
</configuration>
You need to retrieve the connection string named AdventureWorksLT from the configuration file. Which line of code should you use?

A.varconnectionString=ConfigurationManager.
ConnectionStrings[“AdventureWorksLT”].ConnectionString;

B.varconnectionString=ConfigurationManager.
ConnectionStrings[“AdventureWorksLT”].Name;

C.varconnectionString=ConfigurationManager.
AppSettings[“AdventureWorksLT”];

D.varconnectionString=ConfigurationSettings.
AppSettings[“AdventureWorksLT”];

Answer: A

QUESTION 68
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that uses the Entity Framework.
You create an Entity Data Model (EDM) named Model.
You need to ensure that the Storage Schema Definition Language (SSDL) of the EDM can be modified without rebuilding the application.
What should you do?

A.Set the Metadata Artifact Processing property to Embed in Output Assembly and use the
following connection string:
metadata=res://*/Model.csdl|
res://*/Model.ssdl|
res://*/Model.msl;
provider=System.Data.SqlClient;
provider connection string=”& “

B.Set the Metadata Artifact Processing property to Copy to Output Directory and use the
following connection string:
metadata=res://*/Model.csdl|
res://*/Model.ssdl|
res://*/Model.msl;
provider=System.Data.SqlClient;
provider connection string =”& “

C.Set the Metadata Artifact Processing property to Embed in Output Assembly and use the
following connection string:
metadata=.\Model.csdl|
.\Model.ssdl|
.\Model.msl;
provider=System.Data.SqlClient;
provider connection string=”& “

D.Set the Metadata Artifact Processing property to Copy to Output Directory and use the
following connection string:
metadata=.\Model.csdl|
.\Model.ssdl|
.\Model.msl;
provider=System.Data.SqlClient;
provider connection string =”& “

Answer: D
Explanation:
How to: Copy Model and Mapping Files to the Output Directory (Entity Data Model Tools) (http://msdn.microsoft.com/en-us/library/cc716709.aspx)

QUESTION 69
You use Microsoft .NET Framework 4.0 to develop an application that connects to a Microsoft SQL Server 2008 database.
You need to prevent dirty or phantom reads.
Which IsolationLevel should you use?

A.Serializable

B.Snapshot

C.ReadCommited

D.ReadUncommited

Answer: B
Explanation:
Unspecified A different isolation level than the one specified is being used, but the level cannot be determined.
When using OdbcTransaction, if you do not set IsolationLevel or you set IsolationLevel to Unspecified, the transaction executes according to the isolation level that is determined by the driver that is being used.
Chaos The pending changes from more highly isolated transactions cannot be overwritten. ReadUncommitted A dirty read is possible, meaning that no shared locks are issued and no exclusive locks are honored.
ReadCommitted Shared locks are held while the data is being read to avoid dirty reads, but the data can be changed before the end of the transaction, resulting in non-repeatable reads or phantom data.
RepeatableRead Locks are placed on all data that is used in a query, preventing other users from updating the data.
Prevents non-repeatable reads but phantom rows are still possible.
Serializable A range lock is placed on the DataSet, preventing other users from updating or inserting rows into the dataset until the transaction is complete.
Snapshot Reduces blocking by storing a version of data that one application can read while another is modifying the same data.
Indicates that from one transaction you cannot see changes made in other transactions, even if you requery.
IsolationLevel Enumeration
(http://msdn.microsoft.com/en-us/library/system.data.isolationlevel.aspx)
Isolation Levels in Database Engine
(http://msdn.microsoft.com/en-us/library/ms189122.aspx)
SET TRANSACTION ISOLATION LEVEL (Transact-SQL)
(http://msdn.microsoft.com/ru-ru/library/ms173763.aspx)

QUESTION 70
You have a ContosoEntities context object named context and a Color object stored in a variable named color.
You write the following code:
context.Colors.DeleteObject(color);
context.SaveChanges();
When the code runs, it generates the following exception:
System.Data.UpdateException: An error occurred while updating the entries. See the inner exception for detials. —>
System.Data.SqlClient.SqlException: The DELETE satement conflicted with the REFERENCE constraint “FK_PartColor”.
The conflict occurred in database “Contoso”, table “dbo.Parts”, column ‘ColorId’
You need to resolve the exception without negatively impacting the rest of the application.
What should you do?

A.In the database, remove the foreign key association between the Parts table and the Colors
table, and then update the entity data model.

B.Add a transation around the call to the SaveChanges() method and handle the exception by
performing a retry.

C.Add code before the call to the DeleteObject() method to examine the collection of Part
objects a ssociated with the Color object and then assign null to the Color property for each
Part object.

D.Change the End2 OnDelete proprety of the FK_PartColor association from None to Cascade

E.Change the End1 OnDelete proprety of the FK_PartColor association from None to Cascade

Answer: C


Braindump2go 70-516 Latest Updaed Braindumps Including All New Added 70-516 Exam Questions from Exam Center which Guarantees You Can 100% Success 70-516 Exam in Your First Try Exam!


FREE DOWNLOAD: NEW UPDATED 70-516 PDF Dumps & 70-516 VCE Dumps from Braindump2go: http://www.braindump2go.com/70-516.html (286 Q&A)

, , , , , , , , , , , , , , , , , , ,

Comments are currently closed.