Three Versions to Choose
We have three versions of 70-516 guide materials: TS: Accessing Data with Microsoft .NET Framework 4 available on our test platform, including PDF, Software and APP online. The most popular one is PDF version and you can totally enjoy the convenience of this version, and this is mainly because there is a demo in it, therefore help you choose what kind of 70-516 practice test are suitable to you and make the right choice. Besides PDF version of study materials can be printed into papers so that you are able to write some notes or highlight the emphasis. On the other hand, Software version of our 70-516 study torrent is also welcomed by customers, especially for windows users. As for PPT online version, it is the third party application, as long as you download the app into your computer; you can enjoy the nice service from us.
High Quality and Efficiency
With our professional experts' unremitting efforts on the reform of our 70-516 guide materials: TS: Accessing Data with Microsoft .NET Framework 4, we can make sure that you can be focused and well-targeted in the shortest time when you are preparing a test, simplify complex and ambiguous contents, and point out exam focus in no time. With the assistance of our 70-516 study torrent you will be more distinctive than your fellow workers, because you will learn to make full use of your fragment time to do something more useful in the same amount of time. All the above services of our 70-516 practice test can enable your study more time-saving, energy-saving and labor-saving.
99% pass rate
We guarantee that if you study our 70-516 guide materials: TS: Accessing Data with Microsoft .NET Framework 4 with dedication and enthusiasm step by step, you will desperately pass the exam without doubt. As the authoritative provider of study materials, we are always in pursuit of high pass rate of 70-516 practice test compared with our counterparts to gain more attention from potential customers. Otherwise if you fail to pass the exam unfortunately with our study materials, we will full refund the products cost to you soon. We believe in the future, our 70-516 study torrent will be more attractive and marvelous with high pass rate.
As we all know it is not easy and smooth for everyone to obtain the 70-516 certification, and especially for those people who cannot make full use of their sporadic time and are not able to study in a productive way. But you are lucky, we can provide you with well-rounded services on 70-516 practice test materials to help you improve ability and come over difficulties when you have trouble studying. We would be very pleased and thankful if you can spare your valuable time to have a look about features of our 70-516 study materials.
DOWNLOAD DEMO
Microsoft TS: Accessing Data with Microsoft .NET Framework 4 Sample Questions:
1. You use Microsoft .NET framework 4.0 to develop an application that connects to a Microsoft SQL Server
2008 database named AdventureWorksLT.
The database resides on an instance named INSTA on a server named SQL01.
You need to configure the application to connect to the database. Which connection string should you add
to the .config file?
A) Data Source=SQL01; Initial Catalog=AdventureWorksLT; Integrated Security=true; Application Name=INSTA;
B) Data Source=AdventureWorksLT; Initial Catalog=SQL01\INSTA; Integrated Security=true;
C) Data Source=SQL01\INSTA; Initial Catalog=AdventureWorksLT; Integrated Security=true;
D) Data Source=SQL01; Initial Catalog=INSTA; Integrated Security=true; Application Name=AdventureWorksLT;
2. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that
uses the Entity Framework.
You create the following Entity Data Model.

You add the following code fragment:
using(var context = new AdventureWorksLTEntities())
{ Customer cust = context.Customers.First(); cust.CompanyName = "Contoso"; int count = 0;
}
The changes to the cust entity must be saved. If an exception is thrown, the application will attempt to save
up to 3 times.
If not, an exception is thrown. Which code segment should you use?
A) while(true)
{ context.SavingChanges += delegate(System.Object o, System.EventArgs e) {
if(count++ >2)
{
throw new Exception();
}
context.SaveChanges();
}
}
B) while(cust.EntityState == EntityState.Modified)
{
try
{
context.SaveChanges();
}
catch(Exception)
{
if(count++ > 2 && context.Connection.State ==
ConnectionState.Broken
{
throw new Exception();
}
}
}
C) while(context.ObjextStateManager.GetObjectStateEntry (cust).OriginalValues.IsDBNull(0)) {
if(count++ >2)
{
break;
}
context.SaveChanges();
}
D) while(count++ < 3)
{
try
{
context.SaveChanges();
break;
}
catch(Exception)
{
}
}
3. 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.
The application has two DataTable objects that reference the Customers and Orders tables in the
database.
The application contains the following code segment. (Line numbers are included for reference only.)
01 DataSet customerOrders = new DataSet();
02 customerOrders.EnforceConstraints = true;
03 ForeignKeyConstraint ordersFK = new ForeignKeyConstraint("ordersFK",
04 customerOrders.Tables
["Customers"].Columns["CustomerID"],
05 customerOrders.Tables["Orders"].Columns
["CustomerID"]);
06 ...
07 customerOrders.Tables["Orders"].Constraints.Add(ordersFK);
You need to ensure that an exception is thrown when you attempt to delete Customer records that have related Order records.
Which code segment should you insert at line 06?
A) ordersFK.DeleteRule = Rule.SetDefault;
B) ordersFK.DeleteRule = Rule.None;
C) ordersFK.DeleteRule = Rule.SetNull;
D) ordersFK.DeleteRule = Rule.Cascade;
4. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application. You use the Entity Framework Designer to create the following Entity Data Model.

The application contains a class as shown in the following code segment. (Line numbers are included for
reference only.)
01 public class MyBaseClass : EntityObject
02 {
03 ....
04 }
You need to ensure that all generated entities inherit from MyBaseClass. What should you do?
A) Change MyBaseClass to inherit from ObjectContext.
B) Modify the generated code file so that all entities inherit from MyBaseClass.
C) Create a new ObjectQuery that uses MyBaseClass as the type parameter.
D) Use the ADO.NET EntityObject Generator template to configure all entities to inherit from MyBaseClass.
5. You use Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL Server
2008 database.
The database contains a ClassStudent table that contains the StudentID for students who are enrolled in
the classes.
You add the following stored procedure to the database.
CREATE PROCEDURE [dbo].[GetNumEnrolled] @ClassID INT, @NumEnrolled INT OUTPUT
AS BEGIN SET NOCOUNT ON SELECT @NumEnrolled = COUNT(StudentID)
FROM ClassStudent
WHERE (ClassID = @ClassID)
END
You write the following code. (Line numbers are included for reference only.)
01 private int GetNumberEnrolled(string classID)
02 {
03 using (SqlConnection conn = new SqlConnection(GetConnectionString())
04 {
05 SqlCommand cmd = new SqlCommand("GetNumEnrolled", conn);
06 cmd.CommandType = CommandType.StoredProcedure;
07 SqlParameter parClass = cmd.Parameters.Add("@ClassID", SqlDbType.Int,
4, "classID");
08 SqlParameter parNum = cmd.Parameters.Add("@NumEnrolled",
SqlDbType.Int);
09 ...
10 conn.Open()
11 ...
12 }
13 }
You need to ensure that the GetNumberEnrolled method returns the number of students who are enrolled
for a specific class.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A) Insert the following code at line 09.
parNum.Direction = ParameterDirection.Output;
B) Insert the following code at line 11.
int numEnrolled = 0;
SqlDataReader reader = cmd.ExecuteReader();
while(reader.Read())
{
numEnrolled = numEnrolled + (int)cmd.Parameters["@NumEnrolled"].Value; } return numEnrolled;
C) Insert the following code at line 09.
parNum.Direction = ParameterDirection.Input;
D) Insert the following code at line 11.
cmd.ExecuteNonQuery();
return (int)parNum.Value;
Solutions:
Question # 1 Answer: C | Question # 2 Answer: B | Question # 3 Answer: B | Question # 4 Answer: D | Question # 5 Answer: A,D |