public void Setup() { var mapper = new ModelMapper(); mapper.AddMapping(typeof(TMapping)); var configuration = new Configuration() .AddProperties(new Dictionary <string, string> { { "dialect", dialect }, { Environment.ConnectionString, connectionString } }); configuration.AddMapping(mapper.CompileMappingForAllExplicitlyAddedEntities()); new SchemaUpdate(configuration).Execute(false, true); sessionFactory = configuration.BuildSessionFactory(); persister = new OutboxPersister <TEntity>(sessionFactory, "TestEndpoint"); }
public async Task Setup() { var mapper = new ModelMapper(); mapper.AddMapping(typeof(TMapping)); var cfg = new Configuration() .DataBaseIntegration(x => { x.Dialect <MsSql2012Dialect>(); x.ConnectionString = Consts.SqlConnectionString; }); cfg.AddMapping(mapper.CompileMappingForAllExplicitlyAddedEntities()); schema = new SchemaExport(cfg); await schema.CreateAsync(false, true); sessionFactory = cfg.BuildSessionFactory(); persister = new OutboxPersister <TEntity>(sessionFactory, "TestEndpoint"); }
public OutboxCleaner(INHibernateOutboxStorage outboxPersister, CriticalError criticalError) { this.outboxPersister = outboxPersister; this.criticalError = criticalError; }