Exemplo n.º 1
0
 protected override void OnStartup(StartupEventArgs e)
 {
     base.OnStartup(e);
     ConnectionHelper.Connect();
     using (UnitOfWork uow = new UnitOfWork(XpoDefault.DataLayer)) {
         DemoDataHelper.Seed(uow);
     }
 }
Exemplo n.º 2
0
 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);
 }
Exemplo 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);
            }
        }
Exemplo 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());
 }
Exemplo 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();
 }