PrepAway - Latest Free Exam Questions & Answers

Category: 70-523

Exam 70-523: Upgrade: Transition your MCPD .NET Framework 3.5 Web Developer Skills to MCPD .NET Framework 4 Web Developer

Which two XML element types should you use?

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 use Entity SQL of the ADO.NE Entity Framework to retrieve data from the database. You need to define a custom function in the conceptual model. You also need to ensure that the function calculates a value based on properties of the object. Which two XML element types should you use? (Each correct answer presents part of the solution. Choose two.)

Which two procedures should you add to the @productId parameter?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You create stored procedures by using the following signatures:

“CREATE procedure [dbo].[Product_Insert](@name varchar(50),@price float)
“CREATE procedure [dbo].[Product_Update](@id int, @name varchar(50), @price float)
“CREATE procedure [dbo].[Product_Delete](@id int)
“CREATE procedure [dbo].[Order_Insert](@productId int, @quantity int)
“CREATE procedure [dbo].[Order_Update](@id int, @quantity int,@originalTimestamp timestamp)
“CREATE procedure [dbo].[Order_Delete](@id int)

You create a Microsoft ADO.NET Entity Data Model (EDM) by using the Product and Order entities as shown in the exhibit. You need to map the Product and Order entities to the stored procedures. Which two procedures should you add to the @productId parameter? (Each correct answer presents part of the solution. Choose two.)

What should you do?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Communication Foundation (WCF) Data Services service. The service connects to a Microsoft SQL Server 2008 database. The service is hosted by an Internet Information Services (IIS) 6.0 Web server.

The application works correctly in the development environment. However, when you connect to the service on the production server, attempting to update or delete an entity results in an error. You need to ensure that you can update and delete entities on the production server. What should you do?

Which code segment should you insert at line 02?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You use the ADO.NET Entity Framework to model entities. You write the following code segment. (Line numbers are included for reference only.)

01AdventureWorksEntities context = New AdventureWorksEntities (http://localhost:1234/AdventureWorks.svc );
02
03var q = from c in context.Customers
04where c.City == “London”
05orderby c.CompanyName
06select c;

You need to ensure that the application meets the following requirements: “Compares the current values of unmodified properties with values returned from the data source. “Marks the property as modified when the properties are not the same. Which code segment should you insert at line 02?

What should you do?

You use Microsoft Visual Studio 2010 and Microsoft ADO.NET Framework 4 to create an application. The application connects to a Microsoft SQL Server 2008 database. You use the ADO.NET LINQ to SQL model to retrieve data from the database. You use stored procedures to return multiple result sets. You need to ensure that the result sets are returned as strongly typed values. What should you do?

Which code segment should you insert at line 03?

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?

Which code fragment should you add to the .edmx file?

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. You create an entity as shown in the following code fragment.

<EntityType Name=”ProductCategory”>
<Key>
<PropertyRef Name=”ProductCategoryID” />
</Key>
<Property Name=”ProductCategoryID” Type=”int” Nullable=”false” StoreGeneraedPattern=”Identity” />
<Property Name=”ParentProductCategoryID” Type=”int” />
<Property Name=”Name” Type=”nvarchar” Nullable=”false” MaxLength=”50″ />

</EntityType>

You need to provide two entity-tracking fields: “rowguid that is automatically generated when the entity is created “ModifiedDate that is automatically set whenever the entity is updated Which code fragment should you add to the .edmx file?

Which ObjectContext method should you call?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You use the ADO.NET Entity Framework to model your entities.
You use Plain Old CLR Objects (POCO) entities along with snapshot-based change tracking. The code accesses the POCO entities directly.
You need to ensure that the state manager synchronizes when changes are made to the object graph.
Which ObjectContext method should you call?

Which code segment should you insert at line 02?

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 a DataTable named OrderDetailTable that has the following columns: “ID “OrderID “ProductID “Quantity “LineTotal Some records contain a null value in the LineTotal field and 0 in the Quantity field. You write the following code segment. (Line numbers are included for reference only.)

01DataColumn column = new DataColumn(“UnitPrice”, typeof(double));
02
03OrderDetailTable.Columns.Add(column);

You need to add a calculated DataColumn named UnitPrice to the OrderDetailTable object. You also need to ensure that UnitPrice is set to 0 when it cannot be calculated. Which code segment should you insert at line 02?


Page 12 of 14« First...1011121314