Microsoft 70-487 Developing Microsoft Azure and Web Services Exam Practice Test

Page: 1 / 14
Total 203 questions
Question 1

Errors occasionally occur when saving data using the FlightInfoContext ADO.NET Entity Framework context. Updates to the data are being lost when an error occurs.

You need to ensure that data is still saved when an error occurs by retrying the operation. No more than five retries should be performed.

With which code segment should you replace the body of the SaveChanges() method in the FlightInfoContext.es file?



Answer : C

EntitySqlException: Represents errors that occur when parsing Entity SQL command text. This exception is thrown when syntactic or semantic rules are violated.

SqlException: The exception that is thrown when SQL Server returns a warning or error. This class cannot be inherited.

EntityCommandExecutionException : Represents errors that occur when the underlying storage provider could not execute the specified command. This exception usually wraps a provider-specific exception.


Question 2

You need to implement a solution that meets the logging requirements.

Which class should you use?



Answer : D


Question 3

You need to compile CarBusinesLogic.dll by using Microsoft Visual Studio.

Which attribute should you add before you compile the dynamic-link library (DLL)?



Answer : B

Scenario: The CarBusinessLogic.dll assembly must be strongly-named.

One way to sign an assembly with a strong name is by using assembly attributes to insert the strong name information into your code. You can use either the AssemblyKeyFileAttribute or the AssemblyKeyNameAttribute attribute, depending on where the key file to be used is located.

Note: To sign an assembly with a strong name by using attributes

References: https://msdn.microsoft.com/en-us/library/xc31ft41(v=vs.110).aspx


Question 4

The DeleteExternalOrder() method in the ExternalQueueService service is not throwing a FaultException exception as defined by the FaultContractAttribute attribute in the IExternalQueueService.cs file.

You need to throw the FaultException exception.

Which code segments can you insert at line EQ45 to achieve this goal? (Each correct answer presents a complete solution. Chose all that apply)



Answer : B, C


Question 5

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You deploy an ASP.NET Core web application to Azure App Services. You are using Azure Event Hubs to collect the telemetry data for the application.

You need to configure Event Hubs to automatically deliver the telemetry data stream to a persistent data store.

Solution: Configure Azure Event Hubs Capture to deliver data to Azure File Service.

Does the solution meet the goal?



Answer : B

Use Azure Blob storage to store the telemetry data.

References: https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-capture-overview


Question 6

You are developing an ASP.NET MVC application that reads and writes data from a SQL Server database.

You need to prevent the application from reading data that is locked by other transactions. You also need to prevent exclusive range locks.

Which isolation level should you use?



Answer : A


Question 7

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.

You need to return the loans and rate information in a single round trip to the database.

Which code segment should you use?



Answer : B


Page:    1 / 14   
Total 203 questions