public DocumentSchemaWithOverridenDefaultSchemaAndEventsTests() { StoreOptions(options => { options.DatabaseSchemaName = "other"; options.MappingFor(typeof(User)).DatabaseSchemaName = "yet_another"; options.MappingFor(typeof(Issue)).DatabaseSchemaName = "overriden"; options.MappingFor(typeof(Company)); options.Events.AddEventType(typeof(MembersJoined)); }); _schema = theStore.Schema; _sql = _schema.ToDDL(); using (var session = theStore.OpenSession()) { session.Store(new User()); session.Store(new Issue()); session.Store(new Company()); session.SaveChanges(); } _tables = _schema.SchemaTableNames(); _functions = _schema.SchemaFunctionNames(); }
public DocumentSchemaWithOverridenSchemaTests() { StoreOptions(_ => { _.MappingFor(typeof(User)).DatabaseSchemaName = "other"; _.MappingFor(typeof(Issue)).DatabaseSchemaName = "overriden"; _.MappingFor(typeof(Company)); _.DatabaseSchemaName = Marten.StoreOptions.DefaultDatabaseSchemaName; }); _schema = theStore.Schema; _sql = _schema.ToDDL(); using (var session = theStore.OpenSession()) { session.Store(new User()); session.Store(new Issue()); session.Store(new Company()); session.SaveChanges(); } _tables = _schema.SchemaTableNames(); _functions = _schema.SchemaFunctionNames(); }