Esempio n. 1
0
 protected override void OnStartup(StartupEventArgs e)
 {
     base.OnStartup(e);
     ConnectionHelper.Connect();
     using (UnitOfWork uow = new UnitOfWork(XpoDefault.DataLayer)) {
         DemoDataHelper.Seed(uow);
     }
 }
 public static IApplicationBuilder UseXpoDemoData(this IApplicationBuilder app)
 {
     using (var scope = app.ApplicationServices.GetService <IServiceScopeFactory>().CreateScope()) {
         UnitOfWork uow = scope.ServiceProvider.GetService <UnitOfWork>();
         DemoDataHelper.Seed(uow);
     }
     return(app);
 }
Esempio n. 3
0
        void Application_Start(object sender, EventArgs e)
        {
            DevExpress.Web.ASPxWebControl.CallbackError += new EventHandler(Application_Error);

            ConnectionHelper.Connect();
            using (UnitOfWork uow = new UnitOfWork()) {
                DemoDataHelper.Seed(uow);
            }
        }
Esempio n. 4
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     ConnectionHelper.Connect(false);
     using (UnitOfWork uow = new UnitOfWork()) {
         DemoDataHelper.Seed(uow);
     }
     Application.Run(new MainForm());
 }
Esempio n. 5
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            ModelBinders.Binders.DefaultBinder = new DevExpressEditorsBinder();

            ConnectionHelper.Connect();
            DemoDataHelper.Seed();

            DevExpress.Web.ASPxWebControl.CallbackError += Application_Error;
        }
 public App()
 {
     ConnectionHelper.Connect();
     DemoDataHelper.Seed();
 }