When I write the linq query like this, I get the error message
"System.InvalidOperationException: 'The LINQ expression 'DbSet() .GroupJoin( inner: DbSet(), outerKeySelector: d => d.Id, innerKeySelector: dc => dc.DeviceId, resultSelector: (d, dc) => new { deviceName = d.Name, cams = dc })' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.'
How should I edit the code?
var query = context.Devices
.GroupJoin(context.DeviceControls,
d => d.Id,
dc => dc.DeviceId,
(d, dc) => new
{
deviceName = d.Name,
Cams = dc,
}).ToList();