Most recent 70-521: Examcollection real lab from 52 to 68

70-521 Royal Pack Testengine pdf

100% Actual & Verified — 100% PASS

Unlimited access to the world's largest Dumps library! Try it Free Today!

https://www.exambible.com/70-521-exam/

Product Description:
Exam Number/Code: 70-521
Exam name: UPG:Trans MCPD.NET Frmwk 3.5 Dev Skil to .NET 4 Wndws App Development
n questions with full explanations
Certification: Microsoft Certification
Last updated on Global synchronizing

Free Certification Real IT 70-521 Exam pdf Collection

Exam Code: 70-521 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: UPG:Trans MCPD.NET Frmwk 3.5 Dev Skil to .NET 4 Wndws App Development
Certification Provider: Microsoft
Free Today! Guaranteed Training- Pass 70-521 Exam.

2016 Mar 70-521 Study Guide Questions:

Q52. You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.

You want the application to contain a window as shown in the following exhibit.


The application contains the following code fragment. (Line numbers are included for reference only.)

01 <Grid ShowGridLines="True">

02 <Grid.ColumnDefinitions>

03 <ColumnDefinition />

04 <ColumnDefinition />

05 <ColumnDefinition />

06 </Grid.ColumnDefinitions>

07 <Grid.RowDefinitions>

08 <RowDefinition />

09 <RowDefinition />

10 <RowDefinition />

11 </Grid.RowDefinitions>

13 <TextBlock FontWeight="Bold" Grid.Row="1" Grid.Column="0">Quarter</TextBlock>

14 <TextBlock FontWeight="Bold" Grid.Row="1" Grid.Column="1">Quarter 1</TextBlock>

15 <TextBlock FontWeight="Bold" Grid.Row="1" Grid.Column="2">Quarter 2</TextBlock>

16 <TextBlock FontWeight="Bold" Grid.Row="2" Grid.Column="0">Products</TextBlock>

17 <TextBlock Grid.Row="2" Grid.Column="1">100000</TextBlock>

18 <TextBlock Grid.Row="2" Grid.Column="2">150000</TextBlock>

19 </Grid>

You need to create the application window.

Which code fragment should you insert at line 12?

A. <Rectangle Grid.ColumnSpan="3" Fill="#73B2F5"/>

<Rectangle Grid.Row="1" Grid.RowSpan="2" Fill="#73B2F5"/> <TextBlock FontSize="20" FontWeight="Bold" Grid.Row="0">2010 Products Shipped</TextBlock>

B. <Rectangle Grid.ColumnSpan="3" Fill="#73B2F5"/>

<Rectangle Grid.Row="1" Grid.RowSpan="1" Fill="#73B2F5"/> <TextBlock FontSize="20" FontWeight="Bold" Grid.ColumnSpan="3" Grid.Row="0">2010 Products Shipped</TextBlock>

C. <Rectangle Grid.ColumnSpan="3" Fill="#73B2F5"/>

<Rectangle Grid.RowSpan="3" Fill="#73B2F5"/>

<TextBlock FontSize="20" FontWeight="Bold" Grid.ColumnSpan="3" Grid.Row="0">2010 Products Shipped</TextBlock>

D. <Rectangle Grid.Column="1" Grid.ColumnSpan="2" Fill="#73B2F5"/> <Rectangle Grid.RowSpan="3" Fill="#73B2F5"/>

<TextBlock Grid.Column="1" FontSize="20" FontWeight="Bold" Grid.ColumnSpan="3" Grid.Row="0">2010 Products Shipped</TextBlock>

Answer: C


Q53. You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.

You create a window that contains a Button control and a MenuItem control. Both controls are labeled

"Add sugar." The Command properties of the Button and MenuItem controls are set to the same

RoutedCommand named AddSugarCommand.

You write the following code segment.

private void CanAddSugar (object sender, CanExecuteRoutedEventArgs e) { ... }

You need to ensure that when the CanAddSugar method sets e.CanExecute to false, the MenuItem and

Button controls are disabled.

What should you do?

A. Create an event handler for the CanExecuteChanged event of the AddSugarCommand command. Call the CanAddSugar method from within the event handler.

B. Inherit the AddSugarCommand from the RoutedUICommand class instead of the RoutedCommand class. Call the CanAddSugar method from within the constructor of the AddSugarCommand command.

C. Add a CommandBinding object to the CommandBinding property of the MenuItem control. Set the CanExecute property of the CommandBinding object to the CanAddSugar method.

D. Add a CommandBinding object to the CommandBindings property of the window. Set the Command property of CommandBinding to the AddSugarCommand command. Set the CanExecute property of the CommandBinding object to the CanAddSugar method.

Answer: D


Q54. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.

The application contains the following code segment. (Line numbers are included for reference only.)

01 class DataAccessLayer

02 {

03 private static string connString;

05 ...

06 public static DataTable GetDataTable(string command){ 08 ...

09 }

10 }

You need to define the connection life cycle of the DataAccessLayer class. You also need to ensure that the application uses the minimum number of connections to the database.

What should you do?

A. Insert the following code segment at line 04.

private static SqlConnection conn = new SqlConnection(connString); public static void Open(){

conn.Open();

}

public static void Close(){

conn.Close();

}

B. Insert the following code segment at line 04.

private SqlConnection conn = new SqlConnection(connString); public void Open(){

conn.Open();

}

public void Close(){

conn.Close();

}

C. Replace line 01 with the following code segment.

class DataAccessLayer : IDisposable

Insert the following code segment to line 04.

private SqlConnection conn = new SqlConnection(connString); public void Open(){

conn.Open();

}

public void Dispose(){

conn.Close();

}

D. Insert the following code segment at line 07.

using (SqlConnection conn = new SqlConnection(connString)){ conn.Open();

}

Answer: D


Q55. 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.)

01 using (AdventureWorksEntities advWorksContext = new AdventureWorksEntities())

02 {

03 ObjectQuery<Product> productQuery = advWorksContext.Product.Where("it.ProductID = 900"); 05 }

You need to log the command that the query executes against the data source.

Which code segment should you insert at line 04?

A. Trace.WriteLine(productQuery.ToString());

B. Trace.WriteLine(productQuery.ToTraceString());

C. Trace.WriteLine(productQuery.CommandText);

D. Trace.WriteLine(((IQueryable)productQuery).Expression);

Answer: B


Q56. You are designing an application by using Windows Presentation Foundation (WPF) and Microsoft .NET Framework 4.

The application allows users to view product details. Product managers can modify the product details for the products that they manage.

You plan to design the application by using the Model璙iew璙iewModel (M-V-VM) pattern.

You need to ensure that the product details can be viewed by all users and modified only by product managers.

What should you do?

A. In the ViewModel, hide all input controls if the user' s role is a Product Manager.

B. In the ViewModel, disable all input controls if the user' s role is not a Product Manager.

C. Create a separate window to modify data.

Create a separate window to view data.

D. Create a separate StackPanel in the window to modify data.

Create a separate StackPanel in the window to view data.

Answer: B


70-521 actual exam

Most up-to-date 70-521 exams:

Q57. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.

You plan to implement a test strategy for the application.

You need to ensure that the test strategy meets the following requirements:

Test data can be added to the test project without recompiling.

Multiple variations of a test can be executed at run time.

What should you do?

A. Use IntelliTrace.

B. Use data-driven tests.

C. Create a single test class.

D. Create a test method for each data variation.

Answer: B


Q58. You are analyzing an application that uses Microsoft .NET Framework 4 and Microsoft SQL Server 2008.

The application is used to maintain an inventory database and is accessed from several remote Windows client applications. The application frequently updates multiple rows in a database table by using a DbDataAdapter object.

Users report that the application runs slowly during peak business hours.

When large number of records are changed by multiple users, you discover the following:

The CPU utilization of the client applications is normal.

The network utilization increases slightly.

The CPU utilization of the database server remains close to the normal average for a day.

You need to resolve the performance issue.

What should you do?

A. Insert a random time interval between updates.

B. Move the update method calls to a separate BackgroundWorker thread.

C. Disable batch updates. Modify the client application to perform a single update.

D. Remove any limit on batch update sizes. Modify the client application to perform a single update.

Answer: D


Q59. You are creating a Windows Communication Foundation (WCF) service based on WSHttpBinding.

New audit requirements dictate that callers must be authenticated on every call to ensure that their credentials have not been revoked.

You need to ensure that the service will not cache the security request token.

What should you do?

A. Apply a ServiceBehavior attribute to the service implementation class with the InstanceContextMode property set to Single.

B. In the message security configuration, change clientCredentialType from IssuedToken to UserName.

C. In the message security configuration, set establishSecurityContext to false.

D. At the end of every operation, call the SessionStateUtility.RaiseSessionEnd method.

Answer: C


Q60. You are designing an application by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010. The application will store data that includes a time and date stamp.

The middle tier of the application is implemented by using Windows Communication Foundation (WCF).

The middle tier connects to geographically separated database servers.

You need to ensure that the application meets the following requirements:

Data stored contains time and date information local to the database server.

Data stored contains Universal Coordinated Time (UTC).

Which class should you use?

A. DateTime

B. DateTimeOffset

C. TimeZone

D. TimeZoneInfo

Answer: B


Q61. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application uses the ADO.NET Entity Framework to manage customer and related order records.

You add a new order for an existing customer.

You need to associate the Order entity with the Customer entity.

What should you do?

A. Set the Value property of the EntityReference of the Order entity.

B. Call the Add method on the EntityCollection of the Order entity.

C. Use the AddObject method of the ObjectContext to add both Order and Customer entities.

D. Use the Attach method of the ObjectContext to add both Order and Customer entities.

Answer: A


70-521 exam question

Printable 70-521 brain dumps:

Q62. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You use Microsoft ADO.NET Entity Data Model (EDM) to model entities.

You create an entity named Person with a schema defined by the following XML fragment.

<EntityType Name="CPerson">

<Key>

<PropertyRef Name="PersonId" />

</Key>

<Property Name="PersonId" Type="Int32" Nullable="false" />

<Property Name="CompanyName" Type="String" />

<Property Name="ContactName" Type="String" />

<Property Name="ContactTitle" Type="String" />

<Property Name="Address" Type="String" />

</EntityType>

You need to ensure that entities within the application are able to add properties related to the city, region, and country of Person's address.

What should you do?

A. Create a new complex type named CAddress that contains the properties for city, region, and country.

Change the Type of the Address property in CPerson to "Self.CAddress".

B. Create a SubEntity named Address.

Map the SubEntity to a stored procedure that retrieves city, region, and country.

C. Create a new entity named Address.

Add a person ID property to filter the results to display only the City, Region, and Country properties for a specific Person entity.

D. Create a view named Name that returns city, region, and country along with person IDs.

Add a WHERE clause to filter the results to display only the City, Region and Country properties for a specific Person entity.

Answer: A


Q63. You have developed a Windows Forms server application by using Microsoft .NET Framework 4. Client applications connect to the server application to receive streaming media on demand on a single server. Each incoming connection is launched on a separate thread.

As the number of client applications increases, users report that connection attempts intermittently fail.

You need to ensure that users can connect to the server application even when the number of client applications increases.

What should you do?

A. Add additional RAM to the server. Increase the size of the thread pool.

B. Add additional RAM to the server. Decrease the size of the thread pool.

C. Install a network load balancer. Increase the size of the connection pool.

D. Install a network load balancer. Decrease the size of the connection pool.

Answer: A


Q64. You are creating a Windows Communication Foundation (WCF) service. You do not want to expose the internal implementation at the service layer.

You need to expose the following class as a service named Arithmetic with an operation named Sum.

public class Calculator

{

public int Add(int x, int y)

{

}

}

Which code segment should you use?

A. [ServiceContract(Namespace="Arithmetic")]

public class Calculator

{

[OperationContract(Action="Sum")]

public int Add(int x, int y)

{

...

}

}

B. [ServiceContract(ConfigurationName="Arithmetic")]

public class Calculator

{

[OperationContract(Action="Sum")]

public int Add(int x, int y)

{

...

}

}

C. [ServiceContract(Name="Arithmetic")]

public class Calculator

{

[OperationContract(Name="Sum")]

public int Add(int x, int y)

{

...

}

}

D. [ServiceContract(Name="Arithmetic")]

public class Calculator

{

[OperationContract(ReplyAction="Sum")]

public int Add(int x, int y)

{

...

}

}

Answer: C


Q65. The endpoint of a Windows Communication Foundation (WCF) service uses basicHttpBinding for its binding. Your company's policies have changed to require that messages not be sent in clear text.

You must ensure that all messages are encrypted when traveling across the network.

What should you do?

A. Set the ProtectionLevel property on the service contract and update the binding attribute in the endpoint element of the configuration file to wsHttpBinding.

B. Set the ProtectionLevel property on the service contract and update the bindingConfiguration attribute in the endpoint element of the configuration file to webHttpBinding.

C. Set the PrincipalPermissionAttribute on the service contract and update the binding attribute in the endpoint element of the configuration file to wsHttpBinding.

D. Set the PrincipalPermissionAttribute on the service contract and update the bindingConfiguration attribute in the endpoint element of the configuration file to wsHttpBinding.

Answer: A


Q66. You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.

You write the following code segment. (Line numbers are included for reference only.)

01 public class Contact

02 {

03 private string _contactName;

05 public string ContactName {

06 get { return _contactName; }

07 set { _contactName = value; }

08 }

10 }

You add the following code fragment within a WPF window control.

<TextBox>

<TextBox.Text>

<Binding Path="ContactName" UpdateSourceTrigger="PropertyChanged">

<Binding.ValidationRules>

<DataErrorValidationRule />

</Binding.ValidationRules>

</Binding>

</TextBox.Text>

</TextBox>

The TextBox control is data-bound to an instance of the Contact class.

You need to ensure that the Contact class contains a business rule to ensure that the ContactName property is not empty or NULL. You also need to ensure that the TextBox control validates the input data.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two).

A. Replace line 01 with the following code segment.

public class Contact : IDataErrorInfo

B. Replace line 01 with the following code segment.

public class Contact : ValidationRule

C. Replace line 01 with the following code segment.

public class Contact : INotifyPropertyChanging

D. Add the following code segment at line 04.

public event PropertyChangingEventHandler PropertyChanging; Modify line 07 with the following code segment:

set {

if (this.PropertyChanging != null)

PropertyChanging(this, new

PropertyChangingEventArgs("ContactName"));

if (string.IsNullOrEmpty(value))

throw new ApplicationException("Contact name is required"); _contactName = value;

}

E. Add the following code segment at line 09.

public string Error {

get { throw new Exception(string.Empty; }

}

public string this[string columnName] {

get {

if (columnName == "ContactName" &&

string.IsNullOrEmpty(this.ContactName))

return "Contact name is required";

return null;

}

}

Answer: AE


Q67. 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?

A. Refresh

B. SaveChanges

C. DetectChanges

D. ApplyPropertyChanges

Answer: C


Q68. 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.

You create classes by using LINQ to SQL based on the records shown in the exhibit. (Click the Exhibit button.)


You need to create a LINQ query to retrieve a list of objects that contains the OrderID and CustomerID properties. You need to retrieve the total price amount of each Order record.

What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

A. from details in dataContext.Order_Detail

group details by details.OrderID into g

join order in dataContext.Orders on g.Key equals order.OrderID select new {

OrderID = order.OrderID, CustomerID = order.CustomerID,

TotalAmount = g.Sum(od => od.UnitPrice * od.Quantity)

}

B. dataContext.Order_Detail.GroupJoin(dataContext.Orders,

d => d.OrderID,

o => o.OrderID,

(dts, ord) => new {

OrderID = dts.OrderID,

CustomerID = dts.Order.CustomerID,

TotalAmount = dts.UnitPrice * dts.Quantity

}

)

C. from order in dataContext.Orders

group order by order.OrderID into g

join details in dataContext.Order_Detail on g.Key equals details.OrderID select new {

OrderID = details.OrderID,

CustomerID = details.Order.CustomerID,

TotalAmount = details.UnitPrice * details.Quantity

}

D. dataContext.Orders.GroupJoin(dataContext.Order_Detail,

o => o.OrderID,

d => d.OrderID,

(ord, dts) => new {

OrderID = ord.OrderID,

CustomerID = ord.CustomerID,

TotalAmount = dts.Sum(od => od.UnitPrice * od.Quantity)

}

)

Answer: AD