public class Product
{
public string Name {set; get;}
public string Type {set; get;}
}
public class ProductType
{
public string Name{get;set}
}
var products = GetProducts();
var productTypes = GetProductTypes();
bool isValid = products.All(x=>x.Type == ??)
I want all products in the "products" to belong only to the type of product.
How can this be done in linq. Any help is much appreciated, am I am amazed at LINQ stuff? Thank.
source
share