How do I get all DbSets from a Context ?

I have multiple DbSets where I query each set and parse the results like this:
var result1 = _context.EXT_PRAMET_INSERTS.Where(x => x.MaterialID == MaterialID).ToList();
var result2 = _context.EXT_DORMER.Where(x => x.MaterialID == MaterialID).ToList();
...
var result1 = _context.EXT_PRAMET_INSERTS.Where(x => x.MaterialID == MaterialID).ToList();
var result2 = _context.EXT_DORMER.Where(x => x.MaterialID == MaterialID).ToList();
...
How can I do the same using a loop where I iterate over each DbSet in the Context and use a query ?
1 Reply
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server