标签: c# sql linq
如何使用linq过滤数据,如:
SQLstr = "SELECT * FROM Table1 WHERE name LIKE '%" & TextBox1.Text & "%'"
答案 0 :(得分:2)
var query = from rec in db.Table1 where rec.name.Contains(TextBox1.Text) select rec;