Linq IN Operator

后端 未结 5 1711
北恋
北恋 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:53

    I guess this is what you want

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

提交回复
热议问题