コード例 #1
0
 public void Configure()
 {
     _mongoUtil.CreateIndex("TenantIdentifier_UniqueIndex",
                            Builders <Tenant> .IndexKeys.Ascending(nameof(Tenant.Identifier)),
                            new CreateIndexOptions <Tenant>
     {
         Unique = true,
     });
 }
コード例 #2
0
 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,
     });
 }