c# - Filtering Sql table Data in Linq -


i m new linq, m searching articles using

dbsearchdatacontext db = new dbsearchdatacontext();          object q = b in db.articles                    b.tags.contains(val) |                    b.newstitle.contains(val) |                    b.englishcontent.contains(val)                    select b; 

i can not exclude results category = video or photos

please me exclude category value "videos" or "photographs"

dbsearchdatacontext db = new dbsearchdatacontext();           object q = b in db.articles                                            (b.tags.contains(val) ||                                b.newstitle.contains(val) ||                                b.englishcontent.contains(val)) &&             !( b.somecategorylist.containts("videos") || b.somecategorylist.contains("photos") )            select b;  

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -