70-487 Real Exam Dumps Questions and answers 21-30

Get Full Version of the Exam
http://www.EnsurePass.com/70-487.html

Question No.21

You are developing an order processing application that uses the ADO.NET Entity Framework against a SQL Server database. Lazy loading has been disabled. The application displays orders and their associated order details. Order details are filtered based on the category of the product in each order.

The Order class is shown below.

image

The OrderDetail class is shown below.

image

The Product class is shown below.

image

The Category class is shown below.

image

You need to return orders with their filtered list of order details included in a single round trip to the database.

Which code segment should you use?

image

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Answer: C

Explanation/Reference:

Question No.22

You are developing a .NET application that uses the HttpClient type to call an ASP.NET Web API application. The API call returns a list of customers in JSON format and logs the results. The URI for the API call is in a variable named address. You need to make the API call without blocking. Which code segment should you use?

image

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Answer: A

Explanation/Reference:

Explanation: Example:

// Create an HttpClient instance

11: HttpClient client = new HttpClient(); 12:

13: // Send a request asynchronously continue when complete 14: client.GetAsync(_address).ContinueWith(

15: (requestTask) =gt;

16: {

17: // Get HTTP response from completed task.

18: HttpResponseMessage response = requestTask.Result; 19:

20: // Check that response was successful or throw exception 21: response.EnsureSuccessStatusCode();

22:

23: // Read response asynchronously as JsonValue and write out top facts for each country 24: response.Content.ReadAsAsynclt;JsonArraygt;().ContinueWith(

25: (readTask) =gt;

Question No.23

You are developing an ASP.NET MVC application. The application has a page that updates an image stored in a database. Members of the EntityClient namespace are used to access an ADO.NET Entity Framework data model. Images and associated metadata are stored in a single database table. You need to run a single query that updates an image and associated metadata in the database while returning only the number of affected rows. Which method of the EntityCommand type should you use?

A.

ExecuteNonQuery()

B.

ExecutcScalar()

C.

ExecuteDbDataReader()

D.

ExecuteReader()

Answer: A

Question No.24

You are developing a new ASP.NET MVC application that does not have an existing database. The requirements for the application are not complete, and the SQL data model will likely change. You need to choose an approach to visually manage a data model. Which approach should you use?

A.

Physical First

B.

Database First

C.

Code First

D.

Model First

Answer: D

Explanation/Reference:

Explanation:

With the model first workflow, you can design a model in a designer.

Question No.25

You are designing an ASP.NET Web API application. You need to select an HTTP verb to allow blog administrators to modify the text of a comment. Which HTTP verb should you use?

A.

GET

B.

DELETE

C.

POST

D.

PUT

Answer: D

Question No.26

You are preparing to develop a set of libraries that uses large data sets. The libraries must be shared across an organization and distributed to several servers. You need to create a remote NuGet feed that exposes the libraries for developer use. What should you do? (Each answer presents part of the solution. Choose all that apply.)

A.

Add packages to the Packages folder.

B.

Create a new Empty Web Application in Visual Studio.

C.

Configure the Packages folder located in the appSettings section of the web application#39;s Web.config.

D.

Install the NuGet.DataFeed Package.

E.

Install the NuGet.Server Package.

F.

Create a new Empty Web Site in Visual Studio.

Answer: ABCE

Explanation/Reference:

Explanation:

Creating Remote Feeds

You can host a remote (or internal) feed on a server that runs IIS. Step 1 (B): Create a new Empty Web Application in Visual Studio Step 2 (E): Install the NuGet.Server Package

Step 3 (C): Configure the Packages folder

Step 4 (A): Add Packages to the Packages folder

Step 5: Deploy and run your brand new Package Feed!

Reference:

Hosting Your Own NuGet Feeds

Question No.27

You are developing an ASP.NET MVC application that reads and writes data from a SQL Server database. You need to maintain data integrity including retrieving identical sets across reads in all situations that use transactions. Which isolation level should you use?

A.

Repeatable

B.

Serializable

C.

ReadUncommitted

D.

ReadCommitted

Answer: A

Explanation/Reference: Explanation: REPEATABLE READ

Specifies that statements cannot read data that has been modified but not yet committed by other transactions and that no other transactions can modify data that has been read by the current transaction until the current transaction completes.

Question No.28

You are developing an ASP.NET MVC application. The application is an order processing system that uses the ADO.NET Entity Framework against a SQL Server database. It has a controller that loads a page that displays customers. Customers are filtered on Country and, if provided, on CompanyName.

You have an Entity Framework context named db. The Customer class is shown below.

image

You need to execute a single deferred query to return the filtered list of customers. Which code segment should you use?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

image

Answer: C

Explanation/Reference:

Question No.29

You are developing a WCF service. You need to create a duplex contract. What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

A.

Apply the MessageContractAttribute attribute to every public method signature included in the appropriate contract.

B.

Create an interface for the client-side duplex contract.

C.

Create an interface for the server-side duplex contract.

D.

Apply the MessageContractAttribute attribute to the appropriate interface.

E.

Apply the ServiceContractAttribute attribute to the appropriate interface. Then, apply the OperationContractAttribute attribute to every public method signature included in that contract.

F.

Set the CallbackContract property to the appropriate interface.

Answer: CEF

Explanation/Reference:

Explanation:

To create a duplex contract

(C) Create the interface that makes up the server side of the duplex contract. (E) Apply the ServiceContractAttribute class to the interface.

Declare the method signatures in the interface.

  1. Apply the OperationContractAttribute class to each method signature that must be part of the public contract.

    Create the callback interface that defines the set of operations that the service can invoke on the client.

    Declare the method signatures in the callback interface. Apply the OperationContractAttribute class to each method signature that must be part of the public contract.

  2. Link the two interfaces into a duplex contract by setting the CallbackContract property in the primary interface to the type of the callback interface.

Reference:

How to: Create a Duplex Contract

Question No.30

You are developing an ASP.NET MVC application. The application is a loan processing system that uses the ADO.NET Entity Framework against a SQL Server database. It has a controller that loads a page that displays all loans along with rate information. Lazy loading has been disabled.

The Loan class is shown below.

image

You need to return the loans and rate information in a single round trip to the database. Which code segment should you use?

image

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Answer: B

Explanation/Reference:

Get Full Version of 70-487 Dumps

Tagged

Leave a Reply

Your email address will not be published. Required fields are marked *