What should your model contain?
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 Data Definition Language (DDL) script of the database contains the following code segment:
CREATE TABLE [Sales].[SalesOrderHeader](
[SalesOrderID] [int] IDENTITY(1,1) NOT NULL,
[BillToAddressID] [int] NOT NULL,
CONSTRAINT [PK_SalesOrderHeader_SalesOrderID]
PRIMARY KEY CLUSTERED ([SalesOrderID] ASC)
)
ALTER TABLE [Sales].[SalesOrderHeader]
WITH CHECK ADD CONSTRAINT [FK_SalesOrderHeader_Address]
FOREIGN KEY([BilIToAddressID])
REFERENCES [Person].[Address]([AddressID])
You create an ADO.NET Entity Framework model. You need to ensure that the entities of the model correctly map to the DDL of the database.
What should your model contain?
What should you recommend?
You are designing the deployment strategy for an ASP.NET Web application.
You need to recommend an approach for displaying a maintenance notice to users while deploying a new version of the Web application.
What should you recommend?
What should you do?
You develop a Windows Communication Foundation (WCF) service. You name the service MovieService in the Movie namespace.
The service is hosted in Microsoft Internet Information Services (IIS). You copy the assembly containing the service to the bin folder in the virtual directory path.
You need to set up the URI that is mapped to the service. What should you do?
Which connection string should you add to the app.config file?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
You use the ADO.NET Entity Framework to model your entities.
The application connects to a Microsoft SQL Server 2008 database named AdventureWorks by using Windows Authentication.
Information about the required Entity Data Model (EDM) is stored in the following files:
* model.csdl
* model.ssdl
* model.msl
These files are embedded as resources in the MyCompanyData.dll file.You need to define the connection string
that is used by the application. Which connection string should you add to the app.config file?
What should you recommend?
You are debugging an ASP.NET Web application.
The Web application is deployed to 32-bit environments and to 64-bit environments.
When the Web application and its assemblies are deployed to a 64-bit production environment, it throws a BadImageFormatException exception.
You need to recommend an approach for identifying the assembly that is causing the problem.
What should you recommend?
Which code segment should you insert at line 12?
You are developing a Windows Communication Foundation (WCF) service.
The following code defines and implements the service. (Line numbers are included for reference only.)
01 [ServiceContract(SessionMode = SessionMode.Allowed)]
02 public interface ICatchAll
03 {
04 [OperationContract(IsOneWay = false, Action = “*”, ReplyAction = “*”)]
05 Message ProcessMessage(Message message);
06 }
07
08 public class CatchAllService : ICatchAll
09 {
10 public Message ProcessMessage(Message message)
11 {
12
13 …
14 return returnMsg;
15 }
16 }
You need to ensure that two identical copies of the received message are created in the service.
Which code segment should you insert at line 12?
Which code segment should you use?
You use Microsoft Visual Studio 2010 and Microsoft Entity Framework 4.0 to create an application.
The application connects to a Microsoft SQL Server database. You use the ADO.NET LINQ to SQL model to retrieve data from the database.
The applications contains the Category and Product entities as shown in the following exhibit:
You need to ensure that LINO to SQL executes only a single SQL statement against the database.
You also need to ensure that the query returns the list of categories and the list of products.
Which code segment should you use?
Exhibit:
What should you recommend?
You are reviewing an existing ASP.NET Web application.
A feature that manipulates large files in memory has been added to the Web application.
Thereafter, the Web application begins crashing frequently with an OutOfMemoryException exception.
You need to recommend an approach for debugging the Web application.
What should you recommend?
What should you do?
You are developing a Windows Communication Foundation (WCF) service. One of the parameters used with the
service operations is a security token. The security token is not sensitive.
The monitoring software tracks security tokens and can read tokens in clear text only.
The company security policy requires that you validate all clear text data passed over the corporate network.
You need to ensure that the service verifies that the security token is not changed during transit. What should you do?
What should you do?
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 model includes the entity shown in the following exhibit:
You need to add a function that returns the number of years since a person was hired.
You also need to ensure that the function can be used within LINQ to Entities queries. What should you do?