Hey can anyone help me for:
my code is : //SearchByID
public ActionResult SearchByID(string txtID)
{
var IDList = from n in db.tblDonors select n;
if (!String.IsNullOrEmpty(txtID))
{
IDList = IDList.Where(c =>Convert.ToString( c.D_ID).Contains(txtID));
}
return View(IDList);
}
I'm getting the following error:
LINQ to Entities does not recognize the method 'System.String ToString(Int32)' method, and this method cannot be translated into a store expression.Edit (0)

Manav PandyaRank #166 · 14.3K reputationPosted Feb 14, 2018, 6:26 PM EST
Altaf AnsariRank #1,045 · 1.8K reputationPosted Feb 14, 2018, 6:23 PM EST
kalai vanan145 reputationPosted Mar 2, 2018, 7:39 PM EST