070-516 무료 덤프문제 온라인 액세스
| 시험코드: | 070-516 |
| 시험이름: | TS: Accessing Data with Microsoft .NET Framework 4 |
| 인증사: | Microsoft |
| 무료 덤프 문항수: | 196 |
| 업로드 날짜: | 2026-08-16 |
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 uses the ADO.NET Entity
Framework to model entities.
The database includes objects based on the exhibit (click the Exhibit button).
The application includes the following code segment. (Line numbers are included for reference only.)
01 using(AdventureWorksEntities context = new AdventureWorksEntities())
02 {
03 ...
04 foreach (SalesOrderHeader order in customer.SalesOrderHeader)
05 {
06 Console.WriteLine(String.Format("Order: {0} ",
order.SalesOrderNumber));
07 foreach (SalesOrderDetail item in order.SalesOrderDetail)
08 {
09 Console.WriteLine(String.Format("Quantity: {0} ", item.Quantity));
10 Console.WriteLine(String.Format("Product: {0} ",
item.Product.Name));
11 }
12 }
13 }
You want to list all the orders for a specific customer. You need to ensure that the list contains following fields:
-Order number
-Quantity of products
-Product name
Which code segment should you insert in line 03?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that
uses LINQ to SQL.
The application contains the following model. You write the following code. (Line numbers are included for
reference only.)
01 static void Insert()
02 {
03 NorthwindDataContext dc = new NorthwindDataContext();
04 Customer newCustomer = new Customer();
05 newCustomer.Firstname = "Todd";
06 newCustomer.Lastname = "Meadows";
07 newCustomer.Email = "[email protected]";
08 .....
09 dc.SubmitChanges();
10 }
A product named Bike Tire exists in the Products table. The new customer orders the Bike Tire product.
You need to ensure that the correct product is added to the order and that the order is associated with the
new customer.
Which code segment should you insert at line 08?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application retreives data from Microsoft SQL Server 2008 database named AdventureWorks. The AdventureWorks.dbo.ProductDetails table contains a column names ProductImages that uses a varbinary(max) data type.
You write the following code segment. (Line numbers are included for reference only.)
01 SqlDataReader reader = command.ExecureReader(--empty phrase here --);
02 while(reader.Read())
03 {
04 pubID = reader.GetString(0);
05 stream = new FileStream(...);
06 writer = new BinaryWriter(stream);
07 startIndex = 0;
08 retval = reader.GetBytes(1, startIndex, outByte, 0, bufferSize);
09 while(retval == bufferSize)
10 {
11 ...
12 }
13 writer.Write(outbyte, 0, (int)retval-1);
14 writer.Flush();
15 writer.Close();
16 stream.Close();
17 }
You need to ensure that the code supports streaming data from the ProductImages column. Which code segment should you insert at the empty phrase in line 01?
You use Microsoft .NET Framework 4.0 to develop an application that connects to a Microsoft SQL Server
2008 database.
The application includes a table adapter named taStore, which has the following DataTable.
There is a row in the database that has a ProductID of 680. You need to change the Name column in the
row to "New Product Name".
Which code segment should you use?
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?