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 codes to filter it? Contains doesn't work for me.
public static List<Customer> GetCustomers(string[] customerCodesArray)
{
using (busDataContext g = new busDataContext())
{
return g.Customers.Where(
x => x.customerCode.Contains(customerCodesArray)).ToList();
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…