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 ()