I learned about LINQ today and found a good tool. Linqpad !!

Source: Internet
Author: User

 

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 :)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.