c# - Linq to sql between List and Comma separated string -
i have 1 list , 1 comma separated column value.
lst.add("beauty"); lst.add("services"); lst.add("others"); and column value
beauty,services service,others beauty,others other,services other beauty, food food now want rows contains list item.
output result is
beauty,services service,others beauty,others other,services other beauty, food first edit
these comma separated values 1 of table's 1 column value. need check against column.
assuming can figure out how rowcollection
rowcollection.where(row => row.split(",").tolist().where(x => list.contains(x)).any()).tolist(); will evaluate true if row contains value list.
Comments
Post a Comment