Beispiel #1
0
        static void Main()
        {
            NHibernateService.OpenSessionFactory();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            PrijavaForm      form      = new PrijavaForm();
            PrijavaPresenter presenter = new PrijavaPresenter(form, new UnitOfWork());

            form.Show();

            Application.Run();
        }
Beispiel #2
0
        static void Main()
        {
            ISessionFactory sessionFactory = NHibernateService.OpenSessionFactory();
            //NHibernateService.

            WindowFormsFactory formsFactory      = new WindowFormsFactory();
            IRepositoryFactory repositoryFactory = new RepositoryFactory(sessionFactory);

            MainFormController mainController = new MainFormController(formsFactory, repositoryFactory);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new frmMainWindow(mainController));
        }
Beispiel #3
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            NHibernateService.OpenSessionFactory();

            if (env.IsDevelopment())
            {
                app.UseBrowserLink();
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
            }

            app.UseStaticFiles();
            app.UseAuthentication();

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");
            });
        }