70-516 · Question #174
70-516 Question #174: Real Exam Question with Answer & Explanation
The correct answer is A. var prods = ctx.CreateQuery<Product>(prodQuery,. CreateQuery<T>-Creates an ObjectQuery<T> in the current object context by using the specified ExecuteStoreCommand-Executes an arbitrary command directly against the data source using the existing connection. ExecuteFunction(String, ObjectParameter[])-Executes a stored procedure o
Question
Options
- Avar prods = ctx.CreateQuery<Product>(prodQuery,
- Bvar prods = ctx.ExecuteStoreCommand(prodQuery,
- Cvar prods = ctx.ExecuteFunction<Product>(prodQuery,
- Dvar prods = ctx.ExecuteStoreQuery<Product>(prodQuery,
Explanation
CreateQuery<T>-Creates an ObjectQuery<T> in the current object context by using the specified 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<TElement>(String, Object[])-Executes a query directly against the data source that returns a sequence of typed results. ObjectContext.CreateQuery<T> Method
Community Discussion
No community discussion yet for this question.