我有问题参考我刚刚在languageId
创建的Select
。我知道不能以这种方式完成,因为m.
中的m.languageId
不是我想要的。
var problem = await DataContext.ShopsProducts
.Select(m => new
{
languageId = m.Shop.LanguageId,
name = m.Product.LocalizedProductDetails.Select(
n => n.LanguageId == **m.languageId**);
我知道我可以将m.languageId
替换为m.Shop.LanguageId
,但这在我的项目中已经相当长了,并且在Select
中有更多的引用。有没有办法,或者我应该在整个查询之前从Db中取出它?