I have class “Estimation”, this class has a property “EstimationItems” (the type is IList)
public class EstimationItem
{
public virtual int Id { get; set; }
public virtual Product Product { get; set; }
public virtual int Quantity { get; set; }
public virtual decimal Price { get; set; }
}
public class Product
{
public virtual int Id { get; set; }
public virtual string Code { get; set; }
public virtual string Name { get; set; }
}
When I have an instance of “Estimation”, I’d like to know if “EstimationItems” contain a product with the code “MyCode”.
Using this :