private static void RegisterSupportDbContextToSqliteInMemoryDb(IIocManager iocManager) { var builder = new DbContextOptionsBuilder <SupportDbContext>(); builder.ReplaceService <IEntityMaterializerSource, AbpEntityMaterializerSource>(); var inMemorySqlite = new SqliteConnection("Data Source=:memory:"); builder.UseSqlite(inMemorySqlite); iocManager.IocContainer.Register( Component .For <DbContextOptions <SupportDbContext> >() .Instance(builder.Options) .LifestyleSingleton() ); inMemorySqlite.Open(); var ctx = new SupportDbContext(builder.Options); ctx.Database.EnsureCreated(); using (var command = ctx.Database.GetDbConnection().CreateCommand()) { command.CommandText = SupportDbContext.TicketViewSql; ctx.Database.OpenConnection(); command.ExecuteNonQuery(); } }
private void RegisterSupportDbContextToInMemoryDb(IIocManager iocManager) { var builder = new DbContextOptionsBuilder <SupportDbContext>(); var inMemorySqlite = new SqliteConnection("Data Source=:memory:"); builder.UseSqlite(inMemorySqlite); iocManager.IocContainer.Register( Component .For <DbContextOptions <SupportDbContext> >() .Instance(builder.Options) .LifestyleSingleton() ); inMemorySqlite.Open(); var ctx = new SupportDbContext(builder.Options); ctx.Database.EnsureCreated(); using (var command = ctx.Database.GetDbConnection().CreateCommand()) { ctx.Database.OpenConnection(); } }
public FactBeacukaiService(SupportDbContext _context) { this.context = _context; }
public ExpenditureGoodsService(SupportDbContext _context) { this.context = _context; }
public WIPService(SupportDbContext _context) { this.context = _context; }
public MachineMutationService(SupportDbContext _context) { this.context = _context; }
public FinishedGoodService(SupportDbContext _context) { this.context = _context; }
public ScrapService(SupportDbContext _context) { this.context = _context; }
public ViewFactBeacukaiService(SupportDbContext context) { this.context = context; }
public HOrderService(SupportDbContext _context) { this.context = _context; }
public FactItemMutationService(SupportDbContext _context) { this.context = _context; }
public BeacukaiTempService(SupportDbContext context) { this.context = context; }
public TraceableOutService(ILocalDbProductionDBContext _dBContext, SupportDbContext _context) { this.dBContext = _dBContext; }