What is the syntax for an inner join in LINQ to SQL?

后端 未结 19 1649
感情败类
感情败类 2020-11-22 04:25

I\'m writing a LINQ to SQL statement, and I\'m after the standard syntax for a normal inner join with an ON clause in C#.

How do you represent the follo

19条回答
  •  太阳男子
    2020-11-22 05:09

    Inner join two tables in linq C#

    var result = from q1 in table1
                 join q2 in table2
                 on q1.Customer_Id equals q2.Customer_Id
                 select new { q1.Name, q1.Mobile, q2.Purchase, q2.Dates }
    

提交回复
热议问题