asp.net - How to check data in db using fluent Nhibernate -


i'm new fluent nhibernate , i'm stuck problem i'm creating app , i've login page in app , how can check entered name , password exist in db using fluent nhibernate

public void checklogin(string username, string password) {     // assuming username unique     var users = dbsession.query<user>()         .where(u => u.name == username && u.passwordhash == password)         .list();      if (users.count == 0)     {         // invalid username or password     }     else     {         user logginginuser = users[0];         // user     } } 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -