I have a Class
public class SizesClass
{
public int Sizeid { get; set; }
public string SizeNumbers { get; set; }
}
That datas in SizeNumbers is like 20*20*30
then i have a list of this class that i want order this by one of those numbers.
var orderByDescending = Sizes.OrderBy(x => x.SizeNumbers.Split('*')[2]);
but var orderByDescending turn into null and exeption said
The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities.
Sizes? and the content of SizeNumber might not contain 3 or more elements after the split. gotta check for that.IComparer<SizesClass>to theOrderByand that will filter as expected