public CustomWebApplicationFactory() : base() { // Open connections DBConnection = new SqliteConnection("DataSource=:memory:"); DBConnection.Open(); try { var options = new DbContextOptionsBuilder <hihDataContext>() .UseSqlite(DBConnection) .Options; // Create the schema in the database CurrentDataContext = new hihDataContext(options, true); CurrentDataContext.Database.EnsureCreated(); // Setup the tables DataSetupUtility.InitializeSystemTables(CurrentDataContext); DataSetupUtility.InitializeHomeDefineAndMemberTables(CurrentDataContext); } catch { // Error occurred } finally { } }
public void InitHome3TestData(hihDataContext context) { if (!this.IsHome3DataInitialized) { DataSetupUtility.CreateTestingData_Home3(context); this.IsHome3DataInitialized = true; } }
public void InitBlogTestData(hihDataContext context) { if (!this.IsBlogDataInitialized) { DataSetupUtility.CreateTestingData_Blog(context); this.IsBlogDataInitialized = true; } }
public hihDataContext GetCurrentDataContext() { var options = new DbContextOptionsBuilder <hihDataContext>() .UseSqlite(DBConnection, action => { action.UseRelationalNulls(); }) .UseQueryTrackingBehavior(QueryTrackingBehavior.TrackAll) .EnableSensitiveDataLogging() .Options; var context = new hihDataContext(options, true); return(context); }
public FinanceOrderSRulesController(hihDataContext context) { _context = context; }
public FinancePlansController(hihDataContext context) { _context = context; }
public BlogPostTagsController(hihDataContext context) { _context = context; }
public DBVersionsController(hihDataContext context) { _context = context; }
public CurrenciesController(hihDataContext context) { _context = context; }
public BlogUserSettingsController(hihDataContext context) { _context = context; }
public LanguagesController(hihDataContext context) { _context = context; }
public void DeleteFinanceControlCenter(hihDataContext context, int ccid) { context.Database.ExecuteSqlRaw("DELETE FROM t_fin_controlcenter WHERE ID = " + ccid.ToString()); }
public void DeleteBlogPost(hihDataContext context, int postid) { context.Database.ExecuteSqlRaw("DELETE FROM t_blog_post WHERE ID = " + postid.ToString()); }
public FinanceAccountCategoriesController(hihDataContext context) { _context = context; }
public void DeleteBlogCollection(hihDataContext context, int collid) { context.Database.ExecuteSqlRaw("DELETE FROM t_blog_coll WHERE ID = " + collid.ToString()); }
public void DeleteLearnObject(hihDataContext context, int ctgyid) { context.Database.ExecuteSqlRaw("DELETE FROM t_learn_obj WHERE ID = " + ctgyid.ToString()); }
public void DeleteFinanceDocument(hihDataContext context, int docid) { context.Database.ExecuteSqlRaw("DELETE FROM t_fin_document WHERE ID = " + docid.ToString()); }
public void DeleteFinancePlan(hihDataContext context, int planid) { context.Database.ExecuteSqlRaw("DELETE FROM t_fin_plan WHERE ID = " + planid.ToString()); }
public void DeleteFinanceOrder(hihDataContext context, int ordid) { context.Database.ExecuteSqlRaw("DELETE FROM t_fin_order WHERE ID = " + ordid.ToString()); }
public BlogPostCollectionsController(hihDataContext context) { _context = context; }
public LearnCategoriesController(hihDataContext context) { _context = context; }
public FinanceTransactionTypesController(hihDataContext context) { _context = context; }
public void DeleteFinanceAccount(hihDataContext context, int acntid) { context.Database.ExecuteSqlRaw("DELETE FROM t_fin_account WHERE ID = " + acntid.ToString()); }
public FinanceReportByAccountsController(hihDataContext context) { _context = context; }
public LearnObjectsController(hihDataContext context) { _context = context; }