这是我的代码;
public ActionResult Login(User user, string returnUrl)
{
using (ISession session = FluentNHibernateConnect.OpenSession())
var users = session.QueryOver<User>()
.Where(user.Nick == "asd")
.And(user.Password == "1234")
.List();
}
问题是什么。 var和.where(user.nick ==“asd”)红线?
库;
答案 0 :(得分:0)
where方法采用表达式:
var users = session.QueryOver<User>()
.Where(user => user.Nick == "asd")
.And(user => user.Password == "1234")
.List();