check if data is match with database linq code example
Example: check if an element is in data base linq lambda
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
}