0

To return a single entry I use DbSet.SingleOrDefault(l => l.UserName == userName). There must be an equivilent that will return a list of items (assuming there is more than 1). But I can't find it.

What's the Linq call on a DbSet to get a list of matching items?

David Thielen
  • 28,723
  • 34
  • 119
  • 193

1 Answers1

1
_context.YourEntity.Where(condition).ToList()
Amanvir Mundra
  • 420
  • 1
  • 6
  • 20