Example #1
0
 public DUser GetByUsername(string username)
 {
     using (ISession session = NHibernateHelper.OpenSession())
         return(session.CreateCriteria(typeof(DUser)).Add(Restrictions.Eq("Username", username)).UniqueResult <DUser>());
 }
Example #2
0
 public DUser GetByKeyPhrases(string phrase1, string phrase2)
 {
     using (ISession session = NHibernateHelper.OpenSession())
         return(session.CreateCriteria(typeof(DUser)).Add(Restrictions.Eq("KeyPhrase1", phrase1)).Add(Restrictions.Eq("KeyPhrase1", phrase2)).UniqueResult <DUser>());
 }
Example #3
0
 public DUser GetByIDd(Guid userId)
 {
     using (ISession session = NHibernateHelper.OpenSession())
         return(session.Get <DUser>(userId));
 }