0

I want to search using multiple criteria and for every "discovery" to save to an object. I found a solution for multiple criteria here

But how can I save every find? The example uses a var and probably will only find one row but what happens when you have multiple rows that match your criteria and want to save them all? Should I use foreach?

Community
  • 1
  • 1
Oh hi Mark
  • 153
  • 1
  • 8
  • 28

1 Answers1

0

You would need something like this

myvariable.Where(x => x.id == list.id && (y => y.otherfield)).Select( x => x.somethingelse));
Simon Price
  • 3,011
  • 3
  • 34
  • 98