Access the value of a member expression

前端 未结 9 2073
滥情空心
滥情空心 2020-12-04 08:33

If i have a product.

var p = new Product { Price = 30 };

and i have the following linq query.

var q = repo.Products().Where         


        
9条回答
  •  旧巷少年郎
    2020-12-04 08:57

    Can you use the following:

    var price = p.Price;
    var q = repo.Products().Where(x=>x.Price == price).ToList()
    

提交回复
热议问题