var search = (from c in db.**
where c.first_name == txtbox.Text || Convert.ToInt32(c.id = txtbox.Text)
select new
{
ID = c.ID,
FullName = c.name,
FirstName = c.first,
LastName = c.last
});
I am trying to use a textbox to search database for the name if the name is entered or if they decide to use an ID then search by the ID. When I try it sees that a letter is being used and it's trying to find a number.
Also I would like it so say I enter "A" into the textbox I would like to search for everyone that has an "A" in their name.
Any help would be awesome thanks.