While doing this one
IEnumerable<Colors> c = db.Products.Where(t => t.ProductID == p.ProductID).SelectMany(s => s.Colors);
if (c.Any()) sp.color = Constructor(c);
and later on
private string Constructor<T>(List<T> list)
{
//Do something
}
i get the error
The type arguments for method 'Controller.Constructor(System.Collections.Generic.List)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
Of course it is not correct. But what am i missing?