public virtual IList <T> GetAll() { using (ISession session = NHibernateUtils.OpenSession()) { return(session.QueryOver <T>().List()); } }
public virtual void Delete(T item) { using (ISession session = NHibernateUtils.OpenSession()) { using (ITransaction transaction = session.BeginTransaction()) { session.Delete(item); transaction.Commit(); } } }