I have this LINQ which the first foreach loop is to print unique file extension and the inner foreach loop is to print all the file of that file extension.
But it breaks at the first foreach loop with error
Client side GroupBy is not supported.
var fileByFileExtension = _context.FileDocuments.GroupBy(file => file.FileExtension);
foreach (var fileExt in fileByFileExtension)
{
WriteLine(fileExt.Key);
foreach (var item in fileExt)
{
WriteLine(" " + item.FileName);
}
}