public ActionResult DropAndCreateTables() { Database.SetInitializer(new DropAndCreateTables()); using (var a = new EfContext()) { Response.Write(a.ApplicationSettings.ToList()[0].Id); Response.Write(" \n"); Response.Write(WebSecurity.Initialized); } return View(); }
public void Get_ByLink_test_SESSIONMANAGER() { using (var db = new EfContext()) { var useriId = CreateUser("admin"); AApplication("prd", SessionProviderFactoryTest.DefaultAppId) .WithUser(db.UserProfile.Single(x => x.Id == useriId)) .WithGrid(AGrid() .WithResource(SpecialResourceEnum.Link, "xxx")) .AddTo(new EfRepository(db)); } using (var db = SessionProvider.CreateSession()) { var a = db.Session.Page.Get("xxx"); } }
public ActionResult DropAndCreateAlwaysForce() { Database.SetInitializer(new DropAndCreateAlwaysForce()); // Database.Delete("") using (var a = new EfContext()) { Xxx.DeleteDatabaseData(); new DropAndCreateAlwaysForce().InitializeDatabase(a); SecurityProvider.EnsureInitialized(true); new SampleData(a).Generate(); Response.Write(a.ApplicationSettings.ToList()[0].Id); Response.Write(" \n"); Response.Write(WebSecurity.Initialized); } return RedirectToAction("Index"); }