70-516

Prüfungsfragen und antworten 70-516 Microsoft

SAP ABAP,zertifizierung-portal.de,SAP Certified Associate,SAP Certified Development Associate,SAP Application Associate,SAP-Certifications,SAP Certified Application Associate,SAP Certified Application Professional,SAP Certified Development Professional, SAP Certified Technology Associate, SAP Certified Technology Professional

70-516 TS: Accessing Data with Microsoft .NET Framework 4 Die rasante Entwicklung im Bereich der Informationstechnik macht es zwingend, sich regelmäßig fortzubilden. Weisen Sie Ihr IT-Können nach, absolvieren Sie Ihre Prüfung. Bei Ihrer Zertifizierungsvorbereitung werde Ihnen zertifizierung-portal.de sehr gut helfen.

Prüfungsfragen und antworten 70-516 Microsoft

QUESTION 1
You use Microsoft .NET Framework 4.0 to develop an application that uses the Entity Framework.
The application defines the following Entity SQL (ESQL) query, which must be executed against the mode.

string prodQuery = “select value p from Products as p where p.ProductCategory.Name = @p0″;

You need to execute the query. Which code segment should you use?

A. var prods = ctx.CreateQuery(prodQuery,
new ObjectParameter(“p0″, “Road Bikes”)).ToList();
B. var prods = ctx.ExecuteStoreCommand(prodQuery,
new ObjectParameter(“p0″, “Road Bikes”)).ToList();
C. var prods = ctx.ExecuteFunction(prodQuery,
new ObjectParameter(“p0″, “Road Bikes”)).ToList();
D. var prods = ctx.ExecuteStoreQuery(prodQuery,
new ObjectParameter(“p0″, “Road Bikes”)).ToList();

Answer: A

Explanation/Reference:
CreateQuery – Creates an ObjectQuery in the current object context by using the specified query string.
ExecuteStoreCommand – Executes an arbitrary command directly against the data source using the existing connection.
ExecuteFunction(String, ObjectParameter[]) – Executes a stored procedure or function that is defined in the data source and
expressed in the conceptual model; discards any results returned from the function; and returns the number of rows affected by the execution.
ExecuteStoreQuery(String, Object[]) – Executes a query directly against the data source that returns a sequence of typed results.

ObjectContext.CreateQueryMethod
(http://msdn.microsoft.com/en-us/library/bb339670.aspx)

QUESTION 2
You use Microsoft .NET Framework 4.0 to develop an application that connects to a Microsoft SQL Server 2008 database.
The application uses nested transaction scopes. An inner transaction scope contains code that inserts records into the database.
You need to ensure that the inner transaction can successfully commit even if the outer transaction rolls back.

What are two possible TransactionScope constructors that you can use for the inner transaction to achieve this goal?
(Each correct answer presents a complete solution. Choose two.)

A. TransactionScope(TransactionScopeOption.Required)
B. TransactionScope()
C. TransactionScope(TransactionScopeOption.RequiresNew)
D. TransactionScope(TransactionScopeOption.Suppress)

Answer: CD

Explanation/Reference:
Required – A transaction is required by the scope. It uses an ambient transaction if one already exists.
Otherwise, it creates a new transaction before entering the scope. This is the default value.
RequiresNew – A new transaction is always created for the scope.
Suppress – The ambient transaction context is suppressed when creating the scope.
All operations within the scope are done without an ambient transaction context.

TransactionScopeOption Numeration
(http://msdn.microsoft.com/en-us/library/system.transactions.transactionscopeoption.aspx)

QUESTION 3
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that uses the Entity Framework.
Entity types in the model are generated by the Entity Data Model generator tool (EdmGen.exe).
You write the following code. (Line numbers are included for reference only.)

01 MemoryStream stream = new MemoryStream();
02 var query = context.Contacts.Include(“SalesOrderHeaders.SalesOrderDetails”);
03 var contact = query.Where(“it.LastName = @lastname”, new ObjectParameter(“lastname”, lastName)).First();
04 ….

You need to serialize the contact and all of its related objects to the MemoryStream so that the contact can be deserialized back into the model.
Which code segment should you insert at line 04?

A. var formatter = new XmlSerializer(typeof(Contact), new Type[]
{

typeof(SalesOrderHeader),

typeof(SalesOrderDetail)
});
formatter.Serialize(stream, contact);

B. var formatter = new XmlSerializer(typeof(Contact));
formatter.Serialize(stream, contact);

C. var formatter = new BinaryFormatter();
formatter.Serialize(stream, contact);

D. var formatter = new SoapFormatter();
formatter.Serialize(stream, contact);

Answer: A

Prüfungsfragen und antworten 70-516 Microsoft

Hinterlasse eine Antwort