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