public ActionResult Index()
        {
            var productApplication = new ProductApplication(SessionManager.GetInstance());
            var products           = productApplication.Search(null).ToList();

            return(View(products));
        }
Exemple #2
0
        public void Listing_products_in_the_database()
        {
            IContainer container         = new Container(new NhibernateRegistry());
            var        session           = container.GetInstance <ISessionFactory>();
            var        producApplication = new ProductApplication(session.OpenSession());
            var        products          = producApplication.Search(null).ToList();

            Assert.AreNotEqual(0, products.Count);
        }