Linq IN Operator

后端 未结 5 1709
北恋
北恋 2020-12-06 08:56

I\'ve tried searching for this but couldn\'t find examples that suited my situation.

I have this method for returning customers. How can I use the string array of co

5条回答
  •  离开以前
    2020-12-06 09:51

    You are backwards:

    return g.Customers.Where(x => customerCodesArray.Contains(x.customerCode)).ToList();
    

提交回复
热议问题