gpt4 book ai didi

c# - 将 linq select 查询传递给方法

转载 作者:行者123 更新时间:2023-11-30 22:17:18 25 4
gpt4 key购买 nike

<分区>

var emp = (from a in AdventureWorks.PersonPhones
join b in AdventureWorks.People
on a.BusinessEntityID equals b.BusinessEntityID
join c in AdventureWorks.PhoneNumberTypes
on a.PhoneNumberTypeID equals c.PhoneNumberTypeID
select new { a, b, c }).OrderBy(n => n.c.Name);

我有这个 linq 查询,它选择匿名类型类中的值。我只想将此查询传递给 somemethod() 并在该方法中存储在“emp”中的此查询上调用 toList()。谢谢!

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com