public void Configure() { _mongoUtil.CreateIndex("TenantIdentifier_UniqueIndex", Builders <Tenant> .IndexKeys.Ascending(nameof(Tenant.Identifier)), new CreateIndexOptions <Tenant> { Unique = true, }); }
public void Configure() { _mongoUtil.CreateIndex("InputChannel_ExternalKeyAndTenant_UniqueIndex", Builders <InputChannel> .IndexKeys.Combine( Builders <InputChannel> .IndexKeys.Ascending(nameof(InputChannel.ExternalKey)), Builders <InputChannel> .IndexKeys.Ascending(nameof(InputChannel.TenantId))), new CreateIndexOptions <InputChannel> { Unique = true, }); }