What should you do?
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 use the ADO.NET Entity Framework to model entities.
You need to add a new type to your model that organizes scalar values within an entity.
You also need to map stored procedures for managing instances of the type. What should you do?
What should you design?
You are designing an application by using Microsoft.NET Faremwork Visual Studio 2010. You plan to design an instrumentation stategy for the application. You need to ensure that the strategy meets following requirements:
Captures detaild performance information.
Enables or disables diagnostic messages by using an application configuration option without requiring the application to restart.
What should you design?
Which approach should you recommend?
You are designing an ASP.NET 4 Web application that will integrate third-party components.
You need to minimize the security risks of using these components.
Which approach should you recommend?
Which code segment should you use?
You are developing a client application that consumes a Windows Communication Foundation (WCF) service.
You use the svcutil.exe utility to create a proxy for the service. You use the svcutil.exe switches that generate asynchronous calls.
GetFlight is a service operation that takes no parameters and returns a string.
The GetFlightCallback method must be called when the service operation returns.
You create an instance of the client proxy with the following code:
var client = new TranvelServiceClient();
You need to ensure that a callback is received when the GetFlight operation is called asynchronously. Which code segment should you use?
What should you do?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
You use Microsoft ADO.NET Entity Data Model (EDM) to model entities.
You create an entity named Person with a schema defined by the following XML fragment.
<EntityType Name=”CPerson”>
<Key>
<PropertyRef Name=”PersonId” />
</Key>
<Property Name=”PersonId” Type=”Int32″ Nullable=”false” />
<Property Name=”CompanyName” Type=”String” />
<Property Name=”ContactName” Type=”String” />
<Property Name=”ContactTitle” Type=”String” />
<Property Name=”Address” Type=”String” />
</EntityType>
You need to ensure that entities within the application are able to add properties related to the city, region, and country of Person’s address.
What should you do?
What should you do?
You are designing a Windows Presentation Foundation (WPF) application by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010.
The application will consist of a user interface (UI) tier and a middle tier. The middle tier will be implemented by using Windows Communication Foundation (WCF). You plan to design the exception handling strategy for the application. Each method in the middle tier will contain the following catch block.
Catch e As Argument Null Exception
Throw
When testing the application, you discover that all Argument Null Exceptions that occur in the middle tier do not contain accurate stack trace information.
What should you do?
Which two actions should you recommend?
You are designing an ASP.NET Web application that allows users to type a value in a text box.
The application must function with JavaScript disabled.
You need to design a method for using a Web service to validate the user-typed value before the form is processed.
Which two actions should you recommend?
(Each correct answer presents part of the solution. Choose two.)
Which code segment should you insert at line 03?
You are developing a client application that uses the following code to consume a Windows Communication Foundation (WCF) service.
(Line numbers are included for reference only.)
01 BasicHttpBinding myBinding = new BasicHttpBinding();
02 EndpointAddress myEndpointAddress = new EndpointAddress(“http://contoso.com/TaxService.svc”);
03 …
04 ITaxService client = channelFactory.CreateChannel();
05 string data = client.GetData(1);
You need to consume the service. Which code segment should you insert at line 03?
What should you do next?
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 use the ADO.NET LINQ to Entity model to retrieve data from the database.
You need to call a function that is defined in the conceptual model from within the LINQ to Entities queries.
You create a common language runtime (CLR) method that maps to the function. What should you do next?
What should you use?
You are designing a Windows client application by using Microsoft NET Framework 4 and Microsoft Visual Studio 2010. The business logic layer of the application is implemented by using Windows Communication Foundation (WCF). You write the following code segment in the middle tier:
<ServiceContractO> —
Public Interface lWcf Service
<OperationContractO> —
<FaultContract(GetType(ApplicationException))> —
Sub ProcessData(ByVal d As Data)
End Interface
The Process Data service method is a long-running operation. You need to ensure that the application meets the following requirements:
+ Users can continue to use the user interface while the Process Data service method is running.
+ Message delivery is reliable.
What should you use?