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); }
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); } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); ConnectionHelper.Connect(false); using (UnitOfWork uow = new UnitOfWork()) { DemoDataHelper.Seed(uow); } Application.Run(new MainForm()); }
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(); }