Your application uses the following code to query Entity Framework objects returned by the ObjectContext named context:

var result = from product in context.Products
where product.ProductID == productID
select product;

You need to add code to see the commands that the query will execute against the data source.

Which code segment should you use?

 Posted by Rajkatie on 10/11/2012 | Category: ADO.NET Interview questions | Views: 3042 | Points: 40
Select from following answers:
  1. Console.WriteLine(((ObjectQuery<Products>)result).ToTraceString());
  2. Console.WriteLine(context.ToString());
  3. Console.WriteLine(((EntityCommand)result).ToTraceString());
  4. All Above

Show Correct Answer

Source: MeasureUp.Com | | Alert Moderator 

Comments or Responses

Login to post response