MVC 怎么实现多条件查询

MVC 如何实现多条件查询?
RT 实际有10多个条件,为了简单本例只写了两个条件。 我已将各条件写成string了,又怎么样写成LINQ语句呢?
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult UserSearch(FormCollection collection)
  {
  User obj = new User();
  String querystr = "";
  UpdateModel(obj,collection.ToValueProvider());

  if (!String.IsNullOrEmpty(obj.UserName))
  querystr += " && UserName = " + obj.UserName;

  if (!String.IsNullOrEmpty(obj.PassWord))
  querystr += " && PassWord = " + obj.PassWord;
  ......

  var users = (from s in db.users
  where querystr //这里提示不能将string隐式转换成bool
  select s);
  return View(users);
  }


------解决方案--------------------
到C#版块去问吧
------解决方案--------------------
PagedList<QTable> orders = db.QTable.ToPagedList(id ?? 1, 5);
if (!string.IsNullOrEmpty(Request.QueryString["title"]))//条件1
{
orders = orders .And(p => p.Title.Contains(Request.QueryString["title"]));
}
if (!string.IsNullOrEmpty(Request.QueryString["content"]))//条件2
{
orders = orders .And(p => p.Description.Contains(Request.QueryString["content"]));
}

你只要能把参数post过去就行了 然后接收判断呗

类似的
C# code
var BaseData=db.QTable;
            PagedList<QTable> orders=null;
            var title=Request.QueryString["title"];
            var content=Request.QueryString["content"];
            if (!string.IsNullOrEmpty(title)&&string.IsNullOrEmpty(content))
                orders = (from c in BaseData where c.Title.Contains(title) select c).ToPagedList(id ?? 1, 5);
            else if (!string.IsNullOrEmpty(content)&&string.IsNullOrEmpty(title))
                orders = (from c in BaseData where c.Description.Contains(content) select c).ToPagedList(id ?? 1, 5);
            else if(!string.IsNullOrEmpty(content)&&!string.IsNullOrEmpty(title))
               orders = (from c in BaseData where c.Description.Contains(content) && c.Title.Contains(title) select c).ToPagedList(id ?? 1, 5);
            else
                orders = BaseData.ToPagedList(id ?? 1, 5);

------解决方案--------------------
拼SQL不行么。。。