I have 3 classes in C#:
class Folder
{
int Id { get; set; }
List<File> files { get; set;}
}
class File
{
int Id { get; set; }
Author author { get; set; }
}
class Author
{
int Id { get; set; }
string Name { get; set; }
}
I have a list of Folder items (List):
var folders = getAllFolders();
How can I use Linq to return a list of Folders from the list when i only know the Author id of the files?
I need the list to contain all folders where a given Author has created a file!
Thanks