i have a product table which has a Title as string.
inside my view i have
@using (Html.BeginForm(\"Serach\",\"Store\"))
{
Well, you should use some logging to find out what's actually being sent to the database - but personally I'd split the query up before it gets there:
public ActionResult Search(string q)
{
var result = string.IsNullOrEmpty(q) ? storeDB.Products
: storeDB.Products.Where(p => p.Title.Contains(q));
return View(result);
}
It's possible that the SQL dialect supported by SQL CE doesn't support the check for emptiness that you were using - and this gets round that problem.