Many people know getting Microsoft certification is very useful for their career but they fear failure because they hear it is difficult. Now I advise you to purchase our 070-516 premium VCE file. If you are not sure you can download our 070-516 VCE file free for reference. Please trust me if you pay attention on our 070-516 dumps VCE pdf you will not fail. We can guarantee you pass 070-516 exam 100%.
Why do we have this confidence to say that we are the best for 070-516 exam and we make sure you pass exam 100%? Because our premium VCE file has 80%-90% similarity with the real Microsoft 070-516 questions and answers. Once you finish our 070-516 dumps VCE pdf and master its key knowledge you will pass 070-516 exam easily. If you can recite all 070-516 dumps questions and answers you will get a very high score. Our standard is that No Help, Full Refund. No pass, No pay.
Instant Download: Our system will send you the 070-516 braindumps file you purchase in mailbox in a minute after payment. (If not received within 12 hours, please contact us. Note: don't forget to check your spam.)
Microsoft 070-516 Exam Syllabus Topics:
| Section | Weight | Objectives |
|---|---|---|
| Form and Organize Reliable Applications | 18% | - Enterprise data access design
|
| Query Data | 22% | - Use data access technologies
|
| Control Connections and Context | 18% | - Entity Framework context management
|
| Model Data | 20% | - Design conceptual and logical data models
|
| Control Data | 22% | - Data manipulation and concurrency
|
Microsoft TS: Accessing Data with Microsoft .NET Framework 4 Sample Questions:
1. You use Microsoft .NET Framework 4.0 to develop an application. You use the XmlReader class to load
XML from a location that you do not control.
You need to ensure that loading the XML will not load external resources that are referenced in the XML.
Which code segment should you use?
A) XmlReaderSettings settings = new XmlReaderSettings(); settings.ValidationType = ValidationType.None; XmlReader reader = XmlReader.Create("data.xml", settings);
B) XmlReaderSettings settings = new XmlReaderSettings(); settings.ConformanceLevel = ConformanceLevel.Auto; XmlReader reader = XmlReader.Create("data.xml", settings);
C) XmlReaderSettings settings = new XmlReaderSettings(); settings.XmlResolver = null; XmlReader reader = XmlReader.Create("data.xml", settings);
D) XmlReaderSettings settings = new XmlReaderSettings(); settings.CheckCharacters = true; XmlReader reader = XmlReader.Create("data.xml", settings);
2. 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) String obj = (String)rdr[1];
B) SByte obj = (SByte)rdr[1];
C) XmlReader obj = (XmlReader)rdr[1];
D) Type obj = (Type)rdr[1];
3. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application connects to two different Microsoft SQL Server 2008 database servers named Server1 and
Server2.
A string named sql1 contains a connection string to Server1. A string named sql2 contains a connection
string to Server2.
01 using (TransactionScope scope = new
02 ...
03 )
04 {
05 using (SqlConnection cn1 = new SqlConnection(sql1))
06 {
07 try{
08 ...
09 }
10 catch (Exception ex)
11 {
12 }
13 }
14 scope.Complete();
15 }
You need to ensure that the application meets the following requirements:
-There is a SqlConnection named cn2 that uses sql2.
-The commands that use cn1 are initially enlisted as a lightweight transaction.
The cn2 SqlConnection is enlisted in the same TransactionScope only if commands executed by cn1 do not
throw an exception.
What should you do?
A) Insert the following code segment at line 02.
TransactionScope(TransactionScopeOption.Suppress)
Insert the following code segment at line 08.
cn1.Open();
...
using (SqlConnection cn2 = new SqlConnection(sql2))
{
try
{
cn2.Open();
...
}
catch (Exception ex){}
}
B) Insert the following code segment at line 02.
TransactionScope(TransactionScopeOption.RequiresNew)
Insert the following code segment at line 08.
using (SqlConnection cn2 = new SqlConnection(sql2)) {
try{
cn2.Open();
...
cn1.Open();
...
}
catch (Exception ex){}
}
C) Insert the following code segment at line 02.
TransactionScope(TransactionScopeOption.RequiresNew)
Insert the following code segment at line 08.
cn1.Open();
...
using (SqlConnection cn2 = new SqlConnection(sql2))
{
try
{
cn2.Open();
...
}
catch (Exception ex){}
}
D) Insert the following code segment at line 02.
TransactionScope(TransactionScopeOption.Suppress)
Insert the following code segment at line 08.
using (SqlConnection cn2 = new SqlConnection(sql2))
{
try
{
cn2.Open();
...
cn1.Open();
...
}
catch (Exception ex){}
}
4. 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) String obj = (String)rdr[1];
B) SByte obj = (SByte)rdr[1];
C) XmlReader obj = (XmlReader)rdr[1];
D) Type obj = (Type)rdr[1];
5. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that
uses the EntityFramework.
The application has an entity named Person. A Person instance named person1 and an ObjectContext
instance named model exist.
You need to delete the person1 instance. Which code segment should you use?
A) model.DeleteObject(person1); model.SaveChanges();
B) model.ExecuteStoreCommand("Delete", new []{new ObjectParameter("Person", person1)}; model.SaveChanges();
C) model.Detach(person1); model.SaveChanges();
D) model.ExecuteStoreCommand("Detach", new []{new ObjectParameter("Person", person1)}; model.SaveChanges();
Solutions:
| Question # 1 Answer: C | Question # 2 Answer: A | Question # 3 Answer: A | Question # 4 Answer: A | Question # 5 Answer: A |



