我想创建一个lambda表达式来按集合查询集合
在EF代码优先环境中,我有以下数据对象
我有一个名为price的课程
public class Price
{
public int Id { get; set; }
public string DisplayName { get; set; }
public double Amount { get; set; }
public bool IsActive { get; set; }
public int ItemId { get; set; }
[ForeignKey("ItemId")]
public virtual Item Item { get; set; }
public ICollection<PriceOption> PriceOptions { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
还有一个名为的相关类
public class PriceOption
{
public int Id { get; set; }
public int PriceId { get; set; }
[ForeignKey("PriceId")]
public …Run Code Online (Sandbox Code Playgroud)