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
Post a Comment