Which two actions should you perform?
You are developing an application that includes the following code segment. (Line numbers are included forreference only.)
01 class Animal
02 {
03 public string Color { get; set; }
04 public string Name { get; set; }
05 }
06 private static IEnumerable<Animal> GetAnimals(string sqlConnectionString)
07 {
08 var animals = new List<Animal>();
09 SqlConnection sqlConnection = new SqlConnection(sqlConnectionString);
10 using (sqlConnection)
11 {
12 SqlCommand sqlCommand = new SqlCommand(“SELECT Name, ColorName FROM
Animals”, sqlConnection);
13
14 using (SqlDataReader sqlDataReader = sqlCommand.ExecuteReader())
15 {
16
17 {
18 var animal = new Animal();
19 animal.Name = (string)sqlDataReader[“Name”];
20 animal.Color = (string)sqlDataReader[“ColorName”];
21 animals.Add(animal);
22 }
23 }
24 }
25 return animals;
26 }
The GetAnimals() method must meet the following requirements:
Connect to a Microsoft SQL Server database.
Create Animal objects and populate them with data from the database.
Return a sequence of populated Animal objects.
You need to meet the requirements. Which two actions should you perform? (Each correct answer presents
part of the solution. Choose two.)
Which code segment should you use?
You are developing an application. The application calls a method that returns an array of integers named
employeeIds. You define an integer variable named employeeIdToRemove and assign a value to it. You
declare an array named filteredEmployeeIds. You have the following requirements:
Remove duplicate integers from the employeeIds array.
Sort the array in order from the highest value to the lowest value.
Remove the integer value stored in the employeeIdToRemove variable from the employeeIds array.
You need to create a LINQ query to meet the requirements. Which code segment should you use?
You need to use a collection type that meets the requir…
You have a collection of Order objects.The collection must meet the following requirements:
Use strongly typed members.
Process Order objects in first-in-first-out order.
Store values for each Order object.
Use zero-based indices.
You need to use a collection type that meets the requirements.Which collection type should you use?
You need to ensure that if any of the Execute SQL tasks…
You are editing a SQL Server Integration Services (SSIS) package that contains three Execute SQL tasks and
no other tasks. The package and all three Execute SQL tasks have their TransactionOption property set to
Supported. You need to ensure that if any of the Execute SQL tasks fail, all three tasks will roll back their
changes. What should you do?
You need to design a table structure to ensure that cer…
You are designing a data warehouse hosted on SQL Azure. The data warehouse currently includes the
dimUser and dimDistrict dimension tables and the factSales fact table. The dimUser table contains records for
each user permitted to run reports against the warehouse, and the dimDistrict table contains information about
sales districts. The system is accessed by users from certain districts, as well as by area supervisors and users
from the corporate headquarters. You need to design a table structure to ensure that certain users can see
sales data for only certain districts. Some users must be permitted to see sales data from multiple districts.
What should you do?
You need to add the new capability to all the packages …
You are adding a new capability to several dozen SQL Server Integration Services (SSIS) packages. The new
capability is not available as an SSIS task. Each package must be extended with the same new capability. You
need to add the new capability to all the packages without copying the code between packages. What should
you do?
You need to ensure that package logging occurs
Occasionally a job that executes an existing SQL Server Integration Services (SSIS) package does not
complete and nothing is processed. You need to ensure that package logging occurs. Your solution must
minimize deployment and development efforts. What should you do?
You need to ensure that the project is deployed to the …
You are deploying a project to the SQL Server Integration Services (SSIS) catalog. You need to ensure that the
project is deployed to the production environment with the least amount of administrative effort. What should
you do?
You need to establish the best technique to log these i…
You are writing a SQL Server Integration Services (SSIS) package that transfers data from a legacy system.
Data integrity in the legacy system is very poor. Invalid rows are discarded by the package but must be logged
to a CSV file for auditing purposes. You need to establish the best technique to log these invalid rows while
minimizing the amount of development effort. What should you do?
You need to ensure that the custom object is deployed o…
You are deploying a new SQL Server Integration Services (SSIS) project to the test environment. A package in
the project uses a custom task component. You need to ensure that the custom object is deployed on the test
environment correctly. What should you do?