public PortfolioSeedDataFixture() { // The Database should have a different name each time.. Action <DbContextOptionsBuilder> configureDbContext = db => db.UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString()); PortfolioAceDbContextFactory factory = new PortfolioAceDbContextFactory(configureDbContext); PortfolioContext = factory.CreateDbContext(); TestSeeds.SeedPortfolio(PortfolioContext); }
public void DummyServiceTest3() { Action <DbContextOptionsBuilder> configureDbContext = db => db.UseInMemoryDatabase(databaseName: "DummyServiceTest3"); PortfolioAceDbContextFactory factory = new PortfolioAceDbContextFactory(configureDbContext); using (PortfolioAceDbContext context = factory.CreateDbContext()) { TestSeeds.SeedPortfolio(context); } IAdminService aService = new AdminService(factory); bool res = aService.SecurityExists("MSFT", "Cryptocurrency"); Assert.False(res); }
protected override void OnStartup(StartupEventArgs e) { _host.Start(); System.Windows.FrameworkCompatibilityPreferences.KeepTextBoxDisplaySynchronizedWithTextProperty = false; // allows me to put negatives in textbox PortfolioAceDbContextFactory contextFactory = _host.Services.GetRequiredService <PortfolioAceDbContextFactory>(); using (PortfolioAceDbContext context = contextFactory.CreateDbContext()) { context.Database.Migrate(); } Window window = _host.Services.GetRequiredService <MainWindow>(); window.Show(); base.OnStartup(e); }
public TransferAgencyService(PortfolioAceDbContextFactory contextFactory) { this._contextFactory = contextFactory; }
public AdminService(PortfolioAceDbContextFactory contextFactory) { this._contextFactory = contextFactory; }
public StaticReferences(PortfolioAceDbContextFactory contextFactory) { this._contextFactory = contextFactory; }
public SettingService(PortfolioAceDbContextFactory contextFactory) { this._contextFactory = contextFactory; }
public TransactionService(PortfolioAceDbContextFactory contextFactory) { this._contextFactory = contextFactory; }
public FactTableService(PortfolioAceDbContextFactory contextFactory) { this._contextFactory = contextFactory; }
public PriceService(PortfolioAceDbContextFactory contextFactory, DataConnectionFactory dataFactory) { this._contextFactory = contextFactory; this._dataFactory = dataFactory; }