简体   繁体   中英

How to search data from Database using Linq

I want to query data from database but want to use linq and also check data is null or not and have to use Contains function.

Actually i am sending data from a form then it should be check weather title contains this or not but i am getting error of null

var SearchTile = db.Job.Where(c => c.Title.Contains(Jobserach)).ToList();

在此处输入图片说明

var check = db.Job.ToList();
var SerachTile = check.Where(c => c.Title.Contains(Jobserach));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM