1

What's the correct way to write the following

var orders = OrigOrders.Where(async o => await o.Validate(o));

I keep getting errors like the following: Cannot convert lambda expression to delegate function<order, bool>...

As such I'm writing it like this but this seems superfluous

var Orders = new List<Order>();
foreach(var o in OrigOrders)
{
     if (await Validate(o)) orders.Add(co);
}
Theodor Zoulias
  • 34,835
  • 7
  • 69
  • 104
misterbee180
  • 325
  • 1
  • 13

0 Answers0