Beispiel #1
0
 public ICollection<Event> GetAllAccount(Event acc)
 {
     using (NHibernate.ISession session = SessionFactory.GetNewSession())
     {
         return session.CreateCriteria(typeof(Event)).List<Event>();
     }
 }
Beispiel #2
0
 public void Delete(Event 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(Event 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(Event acc)
        {
            using (NHibernate.ISession session = SessionFactory.GetNewSession())
            {
                using (NHibernate.ITransaction transaction = session.BeginTransaction())
                {
                    session.Save(acc);

                    transaction.Commit();
                }
            }
        }