c# - How do you display the SQL statement of a Linq-To-SQL query? -


I am trying to get the date value of a specific date that is the earliest date value. The holder example has already been taken from data reference (without prefetching), now I need to search through IO EntitySet (that has not been received).

I am doing this in a foreach loop, it takes a long time to retrieve the requested values ​​for each holder. The index did not help indexing, so I want to see the SQL statement to customize the database.

This is the code that needs to be translated into SQL:

  DateTime? EntryDateTime = (Where in Holder.IOs io.IOStatus == "Entry" & amp; amp;; & amp; io.IODateTime.HasValue & amp; io.IODateTime.Value.Date == date.Date Selection io.IODateTime ) .Min ();   

I can not use LINQPad because the LINQ statement is directly DataContext, but iOS EntitySet does not quesry.

Also, if anyone knows that to rewrite the linq statement to speed up recovery, please let me know I use the LoadOptions as the application to delay the application process Would not want to be.

after "text" itemprop = "text">

Hold the query, stop it in the debugger. The UO should be able to see it with the mouse on the query object.

I think your problem is minimal, you get into SQL, what you have in LINQ, and this is not what I will do in SQL

I have a top 1 order and with Will be GL - .. Which is first converted into LINQ ()

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -