70-516 試験問題を無料オンラインアクセス

試験コード:70-516
試験名称:TS: Accessing Data with Microsoft .NET Framework 4
認定資格:Microsoft
無料問題数:196
更新日:2025-09-03
評価
100%

問題 1

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application uses the ADO.NET Entity Framework to model entities.
The application includes a Customer entity along with a CustomerKey property of the Guid type as shown in
the following exhibit:

You discover that when the application adds a new instance of a Customer, calling the SaveChanges
method
results in the following error message: "Server generated keys are only supported for identity columns."
You need to ensure that the application can add new Customer entities. What should you do?

問題 2

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 and contains a LINQ to SQL data model.
The data model contains a function named createCustomer that calls a stored procedure.
The stored procedure is also named createCustomer. The createCustomer function has the following
signature.
createCustomer (Guid customerID, String customerName, String address1)
The application contains the following code segment. (Line numbers are included for reference only.)
01 CustomDataContext context = new CustomDataContext(); 02 Guid userID = Guid.NewGuid();
03 String address1 = "1 Main Steet";
04 String name = "Marc";
05 ...
You need to use the createCustomer stored procedure to add a customer to the database. Which code segment should you insert at line 05?

問題 3

You develop a Microsoft .NET application that uses Entity Framework to store entities in a Microsft SQL
Server 2008 database.
While the application is disconnected from the database, entities that are modified, are serialized to a local
file.
The next time the application connects to the database, it retrieves the identity from the database by using
an object context
named context and stores the entity in a variable named remoteCustomer.
The application then serializes the Customer entity from the local file and stores the entity in a variable
named localCustomer.
The remoteCustomer and the localCustomer variables have the same entity key.
You need to ensure that the offline changes to the Customer entity is persisted in the database when the
ObjectContext.SaveChanges() method is called.
Which line of code should you use?

問題 4

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create a Windows
Communication Foundation (WCF) Data Services service.
The service connects to a Microsoft SQL Server 2008 database. The service is hosted by an Internet
Information Services (IIS) 6.0 Web server.
The application works correctly in the development environment. However, when you connect to the service
on
the production server, attempting to update or delete an entity results in an error.
You need to ensure that you can update and delete entities on the production server. What should you do?

問題 5

You use Microsoft Visual Studio 2010 and Microsoft ADO.NET Framework 4.0 to create an application.
The application connects to a Microsoft SQL Server 2008 database.
You use the ADO.NET LINQ to SQL model to retrieve data from the database. You use stored procedures
to return multiple result sets.
You need to ensure that the result sets are returned as strongly typed values. What should you do?

コメントを追加

あなたのメールアドレスが公開されることはありません。個人情報に関する内容は隠されます *

insert code
画面にある文字を入力してください。