You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database. The application uses the following object query to load a product from the database. (Line numbers are included for reference only.)
01using (AdventureWorksEntities advWorksContext = new AdventureWorksEntities())
02{
03ObjectQuery productQuery = advWorksContext.Product.Where("it.ProductID = 900");
04
05}
You need to log the command that the query executes against the data source. Which code segment should you insert at line 04?
You use Microsoft Visual Studio 2010, Microsoft Sync Framework, and Microsoft .NET Framework 4 to create an application. You have a ServerSyncProvider connected to a Microsoft SQL Server database. The database is hosted on a Web server. Users will use the Internet to access the Customer database through the ServerSyncProvider. You write the following code segment. (Line numbers are included for reference only.)
01SyncTable customerSyncTable = new SyncTable("Customer");
02customerSyncTable.CreationOption = TableCreationOption. UploadExistingOrCreateNewTable;
03
04customerSyncTable.SyncGroup = customerSyncGroup;
05 this.Configuration.SyncTables.Add(customerSyncTable);
You need to ensure that the application meets the following requirements: "Users can modify data locally and receive changes from the server. "Only changed rows are transferred during synchronization. Which code segment should you insert at line 03?
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?
You are implementing an ASP.NET application that includes a page named TestPage.aspx. TestPage.aspx uses a master page named TestMaster.master. You add the following code to the TestPage.aspx code-behind file to read a TestMaster.master public property named CityName. protected void Page_Load(object sender, EventArgs e). { string s = Master.CityName;. } You need to ensure that TestPage.aspx can access the CityName property. What should you do?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server 2008 database. The application uses DataContexts to query the database. You create a function that meets the following requirements:
You need to design a solution for programmatically adding reusable user-interface code to views and allowing the user-interface code to be rendered from the server side. Which approach should you recommend
You have an ASP.NET Web Forms application for processing orders. Many users of the application submit their order forms multiple times due to incorrectly formatted credit card information. You need to plan for validation of the length and format of data in the credit card field on the client side prior to processing each transaction. Which approach should you recommend?
You are designing an ASP.NET Web application for online image editing. Users can upload images to the Web
application and edit those images by using utilities provided by the application. Some utilities are processor
intensive and should be offloaded to a Graphics Processing Unit (GPU). Other utilities require the use of
proprietary algorithms that must be performed on the server.
You need to design a solution for minimizing bandwidth usage and Web server response times during image
processing, while providing a responsive application.
Which two approaches should you recommend? (Each correct answer presents part of the solution. Choose
two.)