📅  最后修改于: 2022-03-11 14:56:46.911000             🧑  作者: Mango
string s = textBox1.text;
var xmyTable = (from ymyTable in objDataContext.myTables where ymyTable.myName == s
Select new {ymyTable.myCode,ymyTable.myNmae}).FirstorDefault();
if(xmyTable.Count>0)
{
//your logic for record found.
}
else
{
//your logic for record not found
}