I hope I explained that correctly. I want to add a returned list of objects to a new list of objects based on certain restrictions. The structure for driveFileList is a list of an object which has another List inside. Essentially it is
public record MiscFile(string fileName, string fileId, List<MiscObject2>)
So far what I have tried is
permissionList.AddRange(driveFileList.Select(f => f.Permissions.Where(p => p.Domain == "domainhere.com")));
But I am not sure how to formulate it in a correct way.
I get a type conversion error and if I try an explicit cast it will still throw an exception. Is this possible with a linq expression or should I just change it entirely?
Any help is appreciated.
Thanks!