Practicetest 70-516 Microsoft it-exams

Practicetest 70-516 Microsoft it-exams

IT Exam,IT Certification,braindump,original questions, question pool,document, braindump, test questions, test question, dumps, test answers, it-exams.com, preparation, pdf, certification questions, answers Certification, certification test, practice test, exam dumps, certification training, answers real questions

70-516 TS: Accessing Data with Microsoft .NET Framework 4 our products come with a 100% guarantee of success. We hold this claim because of the highly dedicated and expert team that we have and because of our past performance.

Practicetest 70-516 Microsoft it-exams

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.CreateQuery Method
(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

Practicetest 70-516 Microsoft it-exams

User Status

Du bist nicht angemeldet.

Aktuelle Beiträge

Microsoft 70-517 Praxisfragen
Wir liefern allen Kunden vor dem Einkauf der Prüfung...
nina008 - 28. Nov, 07:28
70-491 zertifizierungsprüfung
70-491 zertifizierungsprüfung gilt weltweit als eines...
nina008 - 28. Nov, 07:27
70-494 Schulungsunterlagen
Für Praxisprüfung haben wir zertifizierung-portal.de z wei...
nina008 - 28. Nov, 07:25
70-533 Prüfungsvorbereitung
Die detaillierten Analyse und Erläuterungen von den...
nina008 - 28. Nov, 07:23
MB4-873 aktuelles Zertifizierungsprogramm
MB4-873 aktuelles Zertifizierungsprogramm mit den neuen...
nina008 - 25. Nov, 10:02

Links

Suche

 

Status

Online seit 4669 Tagen
Zuletzt aktualisiert: 13. Jul, 03:46

Credits


70-491
70-494
70-517
70-533
77-603
MB4-873
MB4-874
Profil
Abmelden
Weblog abonnieren