Property in class IEnumerable <TDto> get TDto.A == a
So I have a class similar to this
public class Order
{
//some other stuff ...
//setting the internal _orderItems collection ...
IEnumerable<OrderItems> OrderItems { get { return _orderItems; }
}
public class OrderItem
{
//other stuff
public string ProductName {get; set;}
}
If I have a set of orders of a certain type and I have access via linq to order, something like
myOrderRespository.Where(x=>x.OrderItems)
Then I have access to getEnumerator, waht, I would like it to be able to do something like
myOrderRespository.Where(x=>x.OrderItems.ProductName == "Blah")
Is it possible? this is a compiled script and its pseudo-code that I am trying to simplify, so it’s easy to explain (so please forgive me if there are a few errors)
+3