Join two tables using LINQ Query and order based two parameters

前端 未结 3 931
深忆病人
深忆病人 2021-01-18 04:15

I have two tables Customers and Orders. I want a LINQ query to fetch list of all the orders placed by all the customers organized first by month and then by year. If there i

3条回答
  •  滥情空心
    2021-01-18 04:54

    Something like this. You can do it using LINQ Predicates

    var res = Customers.Join(Orders, x => x.customer_id, y => y.customer_id, (x, y) => x).ToList();
    

提交回复
热议问题