79812281

Date: 2025-11-07 11:26:45
Score: 1
Natty:
Report link

You can try using OfType.

Like this:
You'll get error if duplicated value, the null ones will not be accounted.

        var value = await context.Table
        .Where(r => r.Id == recordId)
        .OfType<YourEntity>()
        .Select(r => r.Field)
        .SingleAsync();
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Edson C.