I am making a search index. I got it working pretty good but I cannot incorporate ItemID (item numbers) in my search because i am having trouble converting the String in the TextBox.Text to a int in order for it to be a comparable type.
var q = (from t0 in db.Item
join t1 in db.Categories on t0.CategoryID equals t1.CategoryID
join t2 in db.Divisions on t0.DivisionID equals t2.DivisionID
where t0.DivisionID == DDLInt &&
//Contains
(t0.ItemName.Contains(txtSearch.Text.Trim()) ||
t0.Email.Contains(txtSearch.Text.Trim()) ||
t0.Description.Contains(txtSearch.Text.Trim()) ||
t0.Phone.Contains(txtSearch.Text.Trim()) ||
t0.ItemID.Equals(txtSearch.Text.Trim()))
// ^ This is the line where
// it breaks because it is not a comparable type
group t0 by new
{
I am not sure how to convert or parse it and still have the search work properly.