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 ProduceNHContext(NHContext sourceContext) : base(sourceContext) { }
 public NorthwindNHContext(NHContext sourceContext)
     : base(sourceContext)
 {
 }
Exemple #5
0
 public RepositoryBase()
 {
     _nhContext = new NHContext();
 }
Exemple #6
0
 public NorthwindNHContext(NHContext sourceContext) : base(sourceContext)
 {
 }
Exemple #7
0
 public UnityOfWork()
 {
     session     = NHContext.OpenSession();
     transaction = session.BeginTransaction();
 }