I learned about LINQ today and found a good tool. Linqpad !!
- The advantage of this tool is that you do not needProgramRun in, and use only tools for testing. ThenCodeYou can use it to make it fast, simple, and convenient.
- It can generate Lambda and SQL statements corresponding to its LINQ query. It is very convenient to learn by comparison.
- Allows you to conveniently view stored procedures and internal functions.
- This is a silly way to generate some of the LINQ statement frameworks.
The following describes how to use this tool.
Step 1: Search for the relevant database or directly create a database. As shown in:
Step 2: Read the table information in the relevant database. On the left side, there are stored procedures and related functions in the database. The data interface of the query statement is displayed in the right center. You can set the storage path and read path of the query in the left-side Navigation Pane. The sample is a developer's tutorial. Simple demo and so on.
On the query interface, you can choose to use the LINQ language, based on C # Or VB.
If you want to query the contacts table, right-click the table and select the last item. You can see "from C in contacts where... select ne.
The following code is generated.
Code
From CInContacts
Where
SelectNew
{
C. contactid,
C. firstname,
C. lastname,
C. emailaddress
}
You can complete a simple test by adding the omitted parts ..
Shows the result. Click SQL and Lambda to get the query statement corresponding to your LINQ. Very silly and convenient :)