Which control GUID file should you use?
You are developing an ADO.NET 4.0 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?
What should you do?
You are implementing an ASP.NET MVC 2 Web application that contains several folders.
The Views/Shared/DisplayTemplates folder contains a templated helper named Score.ascx that performs custom formatting of integer values.
The Models folder contains a class named Player with the following definition.
public class Player
{
public String Name { get; set; }
public int LastScore { get; set; }
public int HighScore { get; set; }
}
You need to ensure that the custom formatting is applied to LastScore values when the HtmlHelper.DisplayForModel method is called for any view in the application that has a model of type Player.
What should you do?
Which approach should you recommend?
You need to design a deployment solution for the rewritten Web application.
Which approach should you recommend?
Which control should you use?
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You need to ensure that users can view content in a bookreading format that displays two pages at a time. Which control should you use?
What should you do in the ADO.NET Entity Framework Designer?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application.
You use the ADO.NET Entity Framework Designer to model entities.
You need to ensure that the entities are self-tracking. What should you do in the ADO.NET Entity Framework Designer?
What should you do?
You are implementing an ASP.NET MVC 2 Web application.
You create a shared user control named MenuBar.ascx that contains the application’s menu.
You need to use the menu bar in all application views.
What should you do?
What should you do?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application uses the ADO.NET Entity Framework to model entities. The application allows users to make changes while disconnected from the data store. Changes are submitted to the data store by using the SubmitChanges method of the DataContext object. You receive an exception when you call the SubmitChanges method to submit entities that a user has changed in offline mode. You need to ensure that entities changed in offline mode can be successfully updated in the data store. What should you do?
Which code segment should you insert at line 11?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database. You write the following code segment that executes two commands against the database within a transaction. (Line numbers are included for reference only.)
01 Using connection As New SqlConnection(cnnStr)
02 connection.Open()
03 Dim sqlTran As SqlTransaction = connection.BeginTransaction()
04 Dim command As SqlCommand = connection.CreateCommand()
05 command.Transaction = sqlTran
06 Try
07 command.CommandText = “INSERT INTO Production.ScrapReason(Name) VALUES(‘Wrong size’)”
08 command.ExecuteNonQuery()
09 command.CommandText = “INSERT INTO Production.ScrapReason(Name) VALUES(‘Wrong color’)”
10 command.ExecuteNonQuery()
11
12 End Using
You need to log error information if the transaction fails to commit or roll back.
Which code segment should you insert at line 11?
Which storage Model section of the .edmx file should you include?
You use Microsoft Visual Studio 2010 to create a Microsoft .NET Framework 4.0 application.
You create an Entity Data Model for the database tables shown in the following diagram.
You need to modify the .edmx file so that a many-to-many association can exist between the Address and Customer entities.
Which storage Model section of the .edmx file should you include?
What should you do?
You are implementing an ASP.NET MVC 2 application.
In the Areas folder, you add a subfolder named Product to create a single project area.
You add files named ProductController.cs and Index.aspx to the appropriate subfolders.
You then add a file named Route.cs to the Product folder that contains the following code. (Line numbers are included for reference only.)
01 public class Routes : AreaRegistration
02 {
03 public override string AreaName
04 {
05 get { return “product”; }
06 }
07
08 public override void RegisterArea(AreaRegistrationContext context)
09 {
10 context.MapRoute(“product_default”, “product/{controller}/{action}/{id}”, new { controller = “Product”, action = “Index”, id = “” });
11 }
12 }
When you load the URL http://<applicationname>/product, you discover that the correct page is not returned.
You need to ensure that the correct page is returned.
What should you do?