I'm having some trouble selecting a byte[] from inside of a list of objects model is setup as:
public class container{
public byte[] image{ get;set; }
//some other irrelevant properties
}
in my controller I have:
public List<List<container>> containers; //gets filled out in the code
i'm trying to pull image down one level so I am left with a List<List<byte[]>> using LINQ
so far I have:
var imageList = containers.Select(x => x.SelectMany(y => y.image));
but it is throwing:
cannot convert from
'System.Collections.Generic.IEnumerable<System.Collections.Generic.IEnumerable<byte>>' to
'System.Collections.Generic.List<System.Collections.Generic.List<byte[]>>'
Apparently it is selecting the byte array as a byte?
Some guidance would be appreciated!
ContainerandImage.