Beispiel #1
0
 public ICollection<Photo> GetAllAccount(Photo acc)
 {
     using (NHibernate.ISession session = SessionFactory.GetNewSession())
     {
         return session.CreateCriteria(typeof(Photo)).List<Photo>();
     }
 }
Beispiel #2
0
 public void Delete(Photo acc)
 {
     using (NHibernate.ISession session = SessionFactory.GetNewSession())
     {
         using (NHibernate.ITransaction transaction = session.BeginTransaction())
         {
             //session.Delete(acc.UserName);
             transaction.Commit();
         }
     }
 }
Beispiel #3
0
 public void Update(Photo acc)
 {
     using (NHibernate.ISession session = SessionFactory.GetNewSession())
     {
         using (NHibernate.ITransaction transaction = session.BeginTransaction())
         {
             //session.Update(acc.Password, acc);
             transaction.Commit();
         }
     }
 }
Beispiel #4
0
        public void Insert(Photo acc)
        {
            using (NHibernate.ISession session = SessionFactory.GetNewSession())
            {
                using (NHibernate.ITransaction transaction = session.BeginTransaction())
                {
                    session.Save(acc);

                    transaction.Commit();
                }
            }
        }