Which control GUID file should you use?
You are developing an ADO.NET 4 application that interacts with a Microsoft SQL Server 2008 server
through the SQL Server Native Client. You create a trace DLL registry entry and you register all of the
trace schemas. You need to trace the application data access layer. Which control GUID file should
you use?
Which code segment should you use?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application.
You use the ADO.NET Entity Framework Designer to model entities. You need to associate a
previously deserialized entity named personl to an object context named model and persist changes
to the database. Which code segment should you use?
Which code segment should you insert at line 06?
You use Microsoft .NET Framework 4 to develop an application that uses WCF Data Services to
persist entities from the following Entity Data Model.
You create a new Blog instance named newBlog and a new Post instance named newPost as shown
in the following code segment. (Line numbers are included for reference only.)
01 Blog newBlog = neu Blog();
02 Post neuPost = neu Post ();
03 –
04 Uci serviceUri = new Uri (“… “);
05 BlogsEntities context = new BlogsEntities(serviceUri);
06
You need to ensure that newPost is related to newBlog through the Posts collection property and
that newPost and newBlog are sent to the service. Which code segment should you insert at line 06?
Which code segment should you use?
You use Microsoft .NET Framework 4 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 need to ensure that all transactions can be recovered
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to several SQL Server databases. You create a function that modifies customer
records that are stored in multiple databases. All updates for a given record are performed in a
single transaction. You need to ensure that all transactions can be recovered. What should you do?
Which line of code should you use?
You use Microsoft .NET Framework 4 to develop an application that exposes a WCF Data Services
endpoint. The endpoint uses an authentication scheme that requires an HTTP request that has the
following header format.
GET /OData.svc/Products(1)
Authorization: WRAP access_token “123456789”
You add the following method to your DataService implementation.
protected override void OnStartProcessingRequest
(ProcessRequestArgs args)
{
• • •
}
You need to ensure that the method retrieves the authentication token. Which line of code should
you use?
Which code segment should you use in the Initialize method?
You are developing a WCF data service that will expose an existing Entity Data Model (EDM). You
have the following requirements:
• Users must be able to read all entities that are exposed in the EDM.
• Users must be able to update or replace the SalesOrderHeader entities.
• Users must be prevented from inserting or deleting the SalesOrderHeader entities
You need to ensure that the data service meets the requirements.
Which code segment should you use in the Initialize method?
You need to invoke the stored procedure to return the active products, and you must ensure that the UNQ to SQL
You use Microsoft .NET Framework 4 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 UNQ to SQL context can track
changes to these entities. What should you do?
Which line of code should you use?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application.
You use the ADO.NET Entity Framework Designer to model entities. You retrieve an entity from an
object context. A different application updates the database. You need to update the entity instance
to reflect updated values in the database. Which line of code should you use?
Which code segment should you use?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application
that connects to a Microsoft SQL Server 2008 database. You use the ADO.NET Entity Framework
Designer to model entities. You add the following stored procedure to the database, and you add a
function import to the model.
CREATE PROCEDURE [dbo].[InsertDepartment]
@Name nvarchar(50),
@ ID int NULL OUTPUT
AS
INSERT INTO Department (Name) VALUES (@Name)
SELECT @ID = SCOPE_IDENTITY()
You need to insert a new department and display the generated ID. Which code segment should you
use?