LINQPAD is a tool used for LINQ operations and testing. It has rich functions and is easy to operate.
The interface can be roughly divided into four separate PANES:
1. The upper left part is the data source connection section. Click Add connection [Addconnection] To create a database connection. There are many data source types, including LinqtoSql and WCF services, it can even be another data source.
2. the right part is the query window, which is the part of the code written to the LINQ statement. You can select the language of the Code to be written to the database to be queried, or select the database query analyzer.
3. Some examples and saved queries are shown in the lower left part.
4. The lower right part is the query result window.
5. the tabs in the query result window are very exciting. (Including: Result, expression, SQL statement, MSIL code)
In this article, we use the data in the MERs table as an example. You can select:
1. C # Expression (used for LinqSql queries)
From c in Customers select
C
2. C # Statement (used for C # Statement query, where Dump can display the query result)
Var p = from c in Customers select
C;
P. Dump ();
3. C # Program (used to support methods and types of queries, the Main method must be defined)
VoidMain ()
{
Var
P = from c in Customers select
C;
P. Dump ();
}
4. SQL query statements (traditional SQL query syntax)
Select * from
Customer
5. In the first three methods, S is added after the name of the queried database table by default. note this in LINQPad.
6. The Statement mode C # Statement is recommended for use.
Download LINQPad4
LINQPad.jpg(65.31 K)
12:21:12