private IList <Produto> RetornarLista() { var sessionFactory = NHContext.CreateSessionFactory(); using (var session = sessionFactory.OpenSession()) { var dados = session.QueryOver <Produto>(); return(dados.List <Produto>()); } }
public ProduceNHContext(NHContext sourceContext) : base(sourceContext) { }
public NorthwindNHContext(NHContext sourceContext) : base(sourceContext) { }
public RepositoryBase() { _nhContext = new NHContext(); }
public UnityOfWork() { session = NHContext.OpenSession(); transaction = session.BeginTransaction(); }