Exam 70-516 TS: Accessing Data with Microsoft .NET Framework 4

Published: September 17, 2012
Languages: English
Audiences: IT professionals
Technology: Windows Server 2012
Credit toward certification: Microsoft Certified Technology Specialist (MCTS)

Skills measured
This exam measures your ability to accomplish the technical tasks listed below. The percentages indicate the relative weight of each major topic area on the exam. The higher the percentage, the more questions you are likely to see on that content area on the exam. View video tutorials about the variety of question types on Microsoft exams.

Please note that the questions may test on, but will not be limited to, the topics described in the bulleted text.

Do you have feedback about the relevance of the skills measured on this exam? Please send Microsoft your comments. All feedback will be reviewed and incorporated as appropriate while still maintaining the validity and reliability of the certification process. Note that Microsoft will not respond directly to your feedback. We appreciate your input in ensuring the quality of the Microsoft Certification program.

If you have concerns about specific questions on this exam, please submit an exam challenge.

If you have other questions or feedback about Microsoft Certification exams or about the certification program, registration, or promotions, please contact your Regional Service Center.

Model data (20%)
Map entities and relationships by using the Entity Data Model
Use the Visual Designer, build an Entity Data Model from an existing database, manage complex entity mappings in EDMX, edit EDM XML, map to stored procedures, create user-defined associations between entities, generate classes with inheritance and map them to tables
This objective does not include: using MetadataWorkspace
Map entities and relationships by using LINQ to SQL
Use the Visual Designer, build a LINQ to SQL model from an existing database, map to stored procedures
Create and customize entity objects
Configure changes to an Entity Framework entity, use the ADO.NET EntityObject Generator (T4), extending, self-tracking entities, snapshot change tracking, ObjectStateManager, partial classes, partial methods in the Entity Framework
Connect a POCO model to the Entity Framework
Implement the Entity Framework with persistence ignorance, user-created POCO entities
This objective does not include: use the POCO templates
Create the database from the Entity Framework model
Customize the Data Definition Language (DDL) (templates) generation process, generate scripts for a database, Entity Data Model tools
Create model-defined functions
Edit the Conceptual Schema Definition Language (CSDL), enable model-defined functions by using the EdmFunction attribute, complex types

Manage connections and context (18%)
Configure connection strings and providers
Manage connection strings, including Entity Framework connection strings; use the Configuration Manager; correctly address the Microsoft SQL Server instance; implement connection pooling; manage User Instance and AttachDBfilename; switch providers; implement multiple active result sets (MARS)
This objective does not include: use the ConnectionStringBuilder, Oracle data provider, create and use a custom provider, use third-party providers
Create and manage a data connection
Connect to a data source, close connections, maintain the life cycle of a connection
Secure a connection
Encrypt and decrypt connection strings, use Security Support Provider Interface (SSPI) or SQL Server authentication, read-only versus read/write connections
This objective does not include: Secure Sockets Layer (SSL)
Manage the DataContext and ObjectContext
Manage the life cycle of DataContext and ObjectContext, extend the DataContext and ObjectContext, support POCO
Implement eager loading
Configure loading strategy by using LazyLoadingEnabled, support lazy loading with POCO, explicitly loading entities
Cache data
DataContext and ObjectContext cache, including identity map; local data cache
This objective does not include: Velocity, SqlCacheDependency
Configure ADO.NET Data Services
Create access rules for entities, configure authorization and authentication, configure HTTP verbs

Query data (22%)
Execute a SQL query
DBCommand, DataReader, DataAdapters, DataSets, manage data retrieval by using stored procedures, use parameters, System.Data.Common namespace classes
Create a LINQ query
Syntax-based and method-based queries, join, filter, sort, group, aggregation, lambda expressions, paging, projection
This objective does not include: compile queries
Create an Entity SQL (ESQL) query
Join, filter, sort, group, aggregation, paging, use functions, query plan caching, return a reference to an entity instance, use parameters with ESQL, functionality related to EntityClient classes
Handle special data types
Query BLOBs, filestream, spatial and table-valued parameters
This objective does not include: implement data types for unstructured data, user-defined types, Common Language Runtime (CLR) types
Query XML
LINQ to XML, XmlReader, XmlDocuments, XPath
This objective does not include: XSLT, XmlWriter
Query data by using WCF.NET Data Services
Implement filtering and entitlement in WCF.NET Data Services, address resources, create a query expression, access payload formats, Data Services interceptors

Manipulate data (22%)
Create, update, or delete data by using SQL statements
Create/Update/Delete (CUD), use DataSets, call stored procedures, use parameters
Create, update, or delete data by using DataContext
CUD, call stored procedures, use parameters
This objective does not include: ObjectTrackingEnabled
Create, update, or delete data by using ObjectContext
CUD, calling stored procedures, using parameters, setting SaveOptions
Manage transactions
System.Transactions, DBTransaction, roll back a transaction, Lightweight Transaction Manager (LTM)
This objective does not include: distributed transactions, multiple updates within a transaction, multiple synchronization of data within an acidic transaction
Create disconnected objects
Create self-tracking entities in the Entity Framework, attach objects, DataSets, table adapters

Develop and deploy reliable applications (18%)
Monitor and collect performance data
Log generated SQL (ToTraceString), collect response times, implement performance counters, implement logging, implement instrumentation
Handle exceptions
Resolve data concurrency issues (handle OptimisticConcurrency exception, Refresh method), handle errors, transaction exceptions, connection exceptions, timeout exceptions, handle an exception from the Entity Framework disconnected object, security exceptions
Protect data
Encryption, digital signature, hashing, salting, least privilege
Synchronize data
Online/offline Entity Framework, synchronization services, save locally
Deploy ADO.NET components
Package and publish from Visual Studio, deploy an ADO.NET Services application, package and deploy Entity Framework metadata
This objective does not include: configure IIS, MSDeploy, MSBuild

QUESTION 1
You are developing a Microsoft .NET Framework 4 application.
You need to collect performance data to the event log after the application is deployed to the production environment.
Which two components should you include in the project? (Each correct answer presents part of the solution. Choose two.)

A. A trace listener
B. A debug listener
C. Debug.Asset() statements
D. Debug.WriteLine() statements
E. Trace.WriteLine() statements
Answer: B,C
Explanation: Tracing is a way for you to monitor the execution of your application while it is running.
Example:
For example, suppose you set up two listeners: a TextWriterTraceListener and an EventLogTraceListener. Each listener receives the same message. The TextWriterTraceListener would direct its output to a stream, and the EventLogTraceListener would direct its output to an event log.
The following example shows how to send output to the Listeners collection. C#VB
// Use this example when debugging. System.Diagnostics.Debug.WriteLine(“Error in Widget 42”);
// Use this example when tracing. System.Diagnostics.Trace.WriteLine(“Error in Widget 42”);


QUESTION 2
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 need to create a database from your model.
What should you do?

A. Run the edmgen.exe tool in FullGeneration mode.
B. Run the edmgen.exe tool in FromSSDLGeneration mode.
C. Use the Update Model Wizard in Visual Studio.
D. Use the Generate Database Wizard in Visual Studio. Run the resulting script against a Microsoft SQL Server database.
Answer: D
Explanation:
To update the database, right-click the Entity Framework designer surface and choose Generate Database From Model.
The Generate Database Wizard produces a SQL script file that you can edit and execute.


QUESTION 3
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application that uses the Entity Framework. The application has an entity model that includes SalesTerritory and SalesPerson entities as shown in the following diagram.


You need to calculate the total bonus for all sales people in each sales territory.
Which code segment should you use?
A. from person in model.SalesPersons group person by person.SalesTerritory into territoriesByPerson
select new
{
SalesTerritory = territoriesByPerson.Key,
TotalBonus = territoriesByPerson.Sum(person => person.Bonus) };
B. from territory in model.SalesTerritories group territory by territory.SalesPersons into personByterritories
select new
{
SalesTerritory = personByterritories.Key,
TotalBonus = personByterritories.Key.Sum(person => person.Bonus) };
C. model.SalesPersons
.GroupBy(person => person.SalesTerritory)
.SelectMany(group => group.Key.SalesPersons)
.Sum(person => person.Bonus); D. model.SalesTerritories
.GroupBy(territory => territory.SalesPersons)
.SelectMany(group => group.Key)
.Sum(person => person.Bonus);
Answer: A


QUESTION 4
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 DataContexts to query the database.
The application meets the following requirements:
Stores customer data offline.
Allows users to update customer records while they are disconnected from the server.
Enables offline changes to be submitted back to the SQL Server by using the DataContext object.
You need to ensure that the application can detect all conflicts that occur between the offline customer information submitted to the SQL Server and the server version.
You also need to ensure that you can roll back local changes.
What should you do?

A. Add a try/catch statement around calls to the SubmitChanges method of the DataContext object and catch ChangeConflictExceptions.
B. Add a try/catch statement around calls to the SubmitChanges method of the DataContext object and catch SqlExceptions.
C. Override the Update operation of the DataContext object. Call the ExecuteDynamicUpdate method to generate the update SQL.
D. Call the SubmitChanges method of the DataContext object.
Pass System.Data.Linq.ConflictMode.ContinueOnConflict to the method.
Answer: D
Explanation:
FailOnFirstConflict Specifies that attempts to update the database should stop immediately when the first concurrency conflict error is detected.
ContinueOnConflict Specifies that all updates to the database should be tried, and that concurrency conflicts should be accumulated and returned at the end of the process. ExecuteDynamicUpdate() Method Called inside update override methods to redelegate to LINQ to SQL the task of generating and executing dynamic SQL for update operations. ConflictMode Enumeration
(https://msdn.microsoft.com/en-us/library/bb345922.aspx) DataContext.ExecuteDynamicUpdate Method (https://msdn.microsoft.com/en-us/library/system.data.linq.datacontext.executedynamicupdate.aspx)


QUESTION 5
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 the ADO.NET Entity Framework to model entities.
You need to add a new type to your model that organizes scalar values within an entity.
You also need to map stored procedures for managing instances of the type.
What should you do?

A. Add the stored procedures in the SSDL file along with a Function attribute. Define a complex type in the CSDL file.
Map the stored procedure in the MSL file with a ModificationFunctionElement.
B. Add the stored procedures in the SSDL file along with a Function attribute. Define a complex type in the CSDL file.
Map the stored procedure in the MSL file with an AssociationEnd element.
C. Use the edmx designer to import the stored procedures.
Derive an entity class from the existing entity as a complex type.
Map the stored procedure in the MSL file with an AssociationEnd element. D. Add the stored procedures in the SSDL file along with a Function attribute. Derive an entity class from the existing entity as a complex type.
Map the stored procedure in the MSL file with a ModificationFunctionElement.
Answer: A
Explanation:
EndProperty Element (MSL) (https://msdn.microsoft.com/en-us/library/bb399578.aspx) AssosiationEnd Attribute (https://msdn.microsoft.com/en-us/library/cc716774.aspx)

Click here to view complete Q&A of 70-516 exam
Certkingdom Review

MCTS Training, MCITP Trainnig

Best Microsoft MCTS Certification, Microsoft 70-516 Training at certkingdom.com

Click to rate this post!
[Total: 0 Average: 0]

About the author /


Archives

Latest

+

Random

+
August 2016
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031