For sure pass exam with the help of Microsoft 70-516 study material, That's Easy With Easy4Engine!
Updated: Aug 17, 2026
No. of Questions: 196 Questions & Answers with Testing Engine
Download Limit: Unlimited
Pass your actual test with Easy4Engine updated 70-516 Test Engine at first time. All the contents of Microsoft 70-516 exam study material are with validity and reliability, compiled and edited by the professional experts, which can help you to deal the difficulties in the real test and pass the Microsoft 70-516 exam test with ease.
Easy4Engine has an unprecedented 99.6% first time pass rate among our customers.
We're so confident of our products that we provide no hassle product exchange.
| Certification Vendor: | Microsoft |
| Exam Name: | TS: Accessing Data with Microsoft .NET Framework 4 |
| Exam Number: | 70-516 |
| Related Certifications: | MCTS: .NET Framework 4, Data Access MCITP Database Developer (related track) |
| Certificate Validity Period: | Retired (historical certification; no longer active, no renewal period) |
| Passing Score: | 700/1000 |
| Exam Price: | $165 USD (varies by region) |
| Available Languages: | English |
| Real Exam Qty: | Approximately 40–60 (varies; historical exams) |
| Exam Duration: | 120 minutes |
| Exam Format: | Multiple choice, Multiple response, Case studies |
| Recommended Training: | ADO.NET and Entity Framework training (Microsoft Learn - general) |
| Exam Registration: | Microsoft Certification Portal (historical reference) |
| Sample Questions: | Microsoft 70-516 Sample Questions |
| Exam Way: | Proctored exam (historically Pearson VUE testing centers or online proctoring where available) |
| Pre Condition: | Basic knowledge of C# and .NET Framework 4, familiarity with ADO.NET and database concepts recommended |
| Official Syllabus URL: | https://learn.microsoft.com/en-us/credentials/certifications/ |
| Section | Weight | Objectives |
|---|---|---|
| Query Data | 22% | - Use data access technologies
|
| Control Data | 22% | - Data manipulation and concurrency
|
| Model Data | 20% | - Design conceptual and logical data models
|
| Control Connections and Context | 18% | - Entity Framework context management
|
| Form and Organize Reliable Applications | 18% | - Enterprise data access design
|
1. You use Microsoft .NET Framework 4.0 to develop an ASP.NET 4 Web application.
You need to encrypt the connection string information that is stored in the web.config file. The application is
deployed to multiple servers.
The encryption keys that are used to encrypt the connection string information must be exportable and
importable on all the servers.
You need to encrypt the connection string section of the web.config file so that the file can be used on all of
the servers.
Which code segment should you use?
A) Configuration config = WebConfigurationManager.OpenWebConfiguration("~") ; ConnectionStringsSection section = (ConnectionStringsSection)config.GetSection("connectionStrings"); section.Sectionlnformation.ProtectSection("RsaProtectedConfigurationProvider"); config.Save();
B) Configuration config = WebConfigurationManager.OpenMachineConfiguration("~"); ConnectionStringsSection section = (ConnectionStringsSection)config.GetSection("connectionStrings"); section.Sectionlnformation.ProtectSection("RsaProtectedConfigurationProvider'*); config.Save();
C) Configuration config = WebConfigurationManager.OpenMachineConfiguration ("~") ; ConnectionStringsSection section = (ConnectionStringsSection)config.GetSection ("connectionStrings") ; section.Sectionlnformation.ProtectSection("DpapiProtectedConfigurationProvider"); config.Save () ;
D) Configuration config = WebConfigurationHanager.OpenWebConfiguration ("~") ; ConnectionStringsSection section = (ConnectionStringsSection)config.GetSection ("connectionStrings") ; section.Sectionlnformation.ProtectSection("DpapiProtectedConfigurationProvider"); config.Save ();
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) SByte obj = (SByte)rdr[1];
B) Type obj = (Type)rdr[1];
C) XmlReader obj = (XmlReader)rdr[1];
D) String obj = (String)rdr[1];
3. The database contains a table named Categories. The Categories table has a primary key identity column
named CategoryID.
The application inserts new records by using the following stored procedure.
CREATE PROCEDURE dbo.InsertCategory @CategoryName nvarchar(15), @Identity int OUT
AS INSERT INTO Categories (CategoryName) VALUES(@CategoryName) SET @Identity = SCOPE_IDENTITY() RETURN @@ROWCOUNT
You write the following code segment.
SqlDataAdapter adapter = new SqlDataAdapter("SELECT categoryID, CategoryName
FROM dbo.Categories",connection);
adapter.InsertCommand = new SqlCommand("dbo.InsertCategory", connection);
adapter.InsertCommand.CommandType = commandType.StoredProcedure;
adapter.InsertCommand.Parameters.Add(new SqlParameter("@CategoryName",
SqlDbType.NVarChar, 15,"CategoryName"));
You need to retrieve the identity value for the newly created record. Which code segment should you add?
A) SqlParameter parameter = adapter.InsertCommand.Parameters.Add("@RowCount", SqlDbType.Int); parameter.Direction = ParameterDirection.Output; parameter = adapter.InsertCommand.Parameters.Add("@Identity", SqlDbType.Int, 0, "CategoryID"); parameter.Direction = ParameterDirection.ReturnValue;
B) SqlParameter parameter = adapter.InsertCommand.Parameters.Add("@CategoryName", SqlDbType.Int); parameter.Direction = ParameterDirection.Output; parameter = adapter.InsertCommand.Parameters.Add("@Identity", SqlDbType.Int, 0, "CategoryID"); parameter.Direction = ParameterDirection.Output;
C) SqlParameter parameter = adapter.InsertCommand.Parameters.Add("@CategoryName", SqlDbType.Int); parameter.Direction = ParameterDirection.Output; parameter = adapter.InsertCommand.Parameters.Add("@Identity", SqlDbType.Int, 0, "CategoryID"); parameter.Direction = ParameterDirection.ReturnValue;
D) SqlParameter parameter = adapter.InsertCommand.Parameters.Add("@RowCount", SqlDbType.Int); parameter.Direction = ParameterDirection.ReturnValue; parameter = adapter.InsertCommand.Parameters.Add("@Identity", SqlDbType.Int, 0, "CategoryID"); parameter.Direction = ParameterDirection.Output;
4. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application connects to a Microsoft SQL Server database.
You write the following code segment that executes two commands against the database within a
transaction.
(Line numbers are included for reference only.)
01 using(SqlConnection connection = new SqlConnection(cnnStr)) {
02 connnection.Open();
03 SqlTransaction sqlTran = connection.BeginTransaction();
04 SqlCommand command = connection.CreateCommand();
05 command.Transaction = sqlTran;
06 try{
07 command.CommandText = "INSERT INTO Production.ScrapReason(Name)
VALUES('Wrong size')";
08 command.ExecuteNonQuery();
09 command.CommandText = "INSERT INTO Production.ScrapReason(Name)
VALUES('Wrong color')";
10 command.ExecuteNonQuery();
11 ...
l2 }
You need to log error information if the transaction fails to commit or roll back. Which code segment should you insert at line 11?
A) catch (Exception ex){ Trace.WriteLine(ex.Message); try{
sqlTran.Rollback();
}
catch (Exception exRollback){
Trace.WriteLine(exRollback.Message);
}
}
finaly {
sqltran.commit( );
}
B) catch (Exception ex) { sqlTran.Rollback();
Trace.WriteLine(ex.Message);
}
finaly {
try {
sqltran.commit( );
}
catch (Exception exRollback) {
Trace.WriteLine(excommit.Message);
}
}
C) sqlTran.Commit(); } catch (Exception ex) {
sqlTran.Rollback();
Trace.WriteLine(ex.Message);
}
D) sqlTran.Commit(); } catch (Exception ex) {
Trace.WriteLine(ex.Message);
try {
sqlTran.Rollback();
}
catch (Exception exRollback) {
Trace.WriteLine(exRollback.Message);
}
}
5. Refer to the following lines in the case study: PA40 in \Model\Part.cs, PR16 in\Model\Product.cs, and CT14 in \Model\Component.cs
The application must create XML files that detail the part structure for any product. The XML files must use the following format:
<?xml version="1.0" encoding="utf-8"?>
<product name="Brush" description="Brush product" productType="1">
<component name="Handle" description="Handle" partType="2">
<component name="Screw" description="Screw" partType="3">
<component name="Wood" description="Wooden shaft" partType="45">
</component>
<component name="Head" description="Head" partType="5">
<component name="Screw" description="Screw" partType="3">
<component name="Bristles" description="Bristles" partType="4">
</component> </product>
You need to update the application to support the creation of an XElement object having a structure that will
serialize to the format shown above.
What should you do? (Each correct answer presents part of the solution. Choose two.)
A) Insert the following code segment at line PR16 in \Model\Product.cs:
return new XElement("product, new XElement("name", this.Name),
new XElement("description", this.Description),
new XElement("productType", this.ProductType));
B) Insert the following code segment at line CT14 in \Model\Component.cs:
return new XElement("component, new XElement("name", this.Name),
new XElement("description", this.Description),
new XElement("partType", this.PartType));
C) Insert the following code segment at line PR16 in \Model\Product.cs:
return new XElement("product, new XAttribute("name", this.Name),
new XAttribute("description", this.Description),
new XAttribute("productType", this.ProductType));
D) Insert the following code segment at line CT14 in \Model\Component.cs:
return new XElement("component, new XAttribute("name", this.Name),
new XElement("description", this.Description),
new XElement("partType", this.PartType));
E) Insert the following code segment at line CT14 in \Model\Component.cs:
return new XElement("component, new XAttribute("name", this.Name),
new XAttribute("description", this.Description),
new XAttribute("partType", this.PartType));
F) Insert the following code segment at line PR16 in \Model\Product.cs:
return new XElement("product, new XAttribute("name", this.Name),
new XElement("description", this.Description),
new XElement("productType", this.ProductType));
Solutions:
| Question # 1 Answer: A | Question # 2 Answer: D | Question # 3 Answer: D | Question # 4 Answer: D | Question # 5 Answer: C,E |
Everything is perfect! Thank you so much!
Real questions! Thank you! I have bought many exams from you.
Thanks for Easy4Engine 70-516 exam dumps.
I read your practice questions carefully.
I really thank you so much for the great service.
I memorized all questions and answers.
I read Easy4Engine 70-516 questions and answers, which are great helper in my preparation.
I really like to recommend you to my friends.
I passed, thanks a lot.
Disclaimer Policy: The site does not guarantee the content of the comments. Because of the different time and the changes in the scope of the exam, it can produce different effect. Before you purchase the dump, please carefully read the product introduction from the page. In addition, please be advised the site will not be responsible for the content of the comments and contradictions between users.
Easy4Engine always puts our customers' interest first and aims to offer the valid and useful 70-516 exam practice material to help them pass. Featured with the high quality and accurate questions, Easy4Engine 70-516 training material can help you pass the actual test and get your desired certification.
Besides, we have the money back guarantee on the condition of failure. You just need to show us the failure score report and we will refund you after confirming.
Test Engine: 70-516 study test engine can be downloaded and run on your own devices. Practice the test on the interactive & simulated environment.
PDF (duplicate of the test engine): the contents are the same as the test engine, support printing.
You will receive an email attached with the 70-516 study material within 5-10 minutes, and then you can instantly download it for study. If you do not get the study material after purchase, please contact us with email immediately.
Yes, you will enjoy one year free update after purchase. If there is any update, our system will automatically send the updated study material to your payment email.
Online Test Engine can supports Windows / Mac / Android / iOS, etc., because it is the software based on WEB browser. You can use it on any electronic device and practice with self-paced.
Online Test Engine supports offline practice, while the precondition is that you should run it with the internet at the first time.
Self Test Engine is suitable for windows operating system, running on the Java environment, and can install on multiple computers.
PDF Version: can be read under the Adobe reader, or many other free readers, including OpenOffice, Foxit Reader and Google Docs.
Once download and installed on your PC, you can practice 70-516 test questions, review your questions & answers using two different options 'practice exam' and 'virtual exam'.
Virtual Exam - test yourself with exam questions with a time limit.
Practice Exam - review exam questions one by one, see correct answers.
All the products are updated frequently but not on a fixed date. Our professional team pays a great attention to the exam updates and they always upgrade the content accordingly.
Yes. We have the money back guarantee in case of failure by our products. The process of money back is very simple: you just need to show us your failure score report within 60 days from the date of purchase of the exam. We will then verify the authenticity of documents submitted and arrange the refund after receiving the email and confirmation process. The money will be back to your payment account within 7 days.
We offer some discounts to our customers. There is no limit to some special discount. You can check regularly of our site to get the coupons.
Over 72962+ Satisfied Customers
