|
@@ -94,7 +94,8 @@ namespace TEAMModelOS.SDK.DI
|
|
|
/// <returns></returns>
|
|
|
public async Task InitializeDatabase()
|
|
|
{
|
|
|
- string[] DatabaseIds = BaseConfigModel.Configuration.GetSection("Azure:Cosmos:Database").Get<string[]>();
|
|
|
+ // string[] DatabaseIds = BaseConfigModel.Configuration.GetSection("Azure:Cosmos:Database").Get<string[]>();
|
|
|
+ string[] DatabaseIds =new string[] { "TEAMModelOS" };
|
|
|
bool isMonitor = false;
|
|
|
string leases = "leases";
|
|
|
if (DatabaseIds != null)
|
|
@@ -110,7 +111,8 @@ namespace TEAMModelOS.SDK.DI
|
|
|
}
|
|
|
}
|
|
|
//获取数据库所有的表
|
|
|
- List<Type> types = ReflectorExtensions.GetAllTypeAsAttribute<CosmosDBAttribute>(BaseConfigModel.Configuration.GetSection("Azure:Cosmos:ScanModel").Get<string[]>() );
|
|
|
+ // List<Type> types = ReflectorExtensions.GetAllTypeAsAttribute<CosmosDBAttribute>(BaseConfigModel.Configuration.GetSection("Azure:Cosmos:ScanModel").Get<string[]>() );
|
|
|
+ List<Type> types = ReflectorExtensions.GetAllTypeAsAttribute<CosmosDBAttribute>(new string[] { "TEAMModelOS" });
|
|
|
foreach (Type type in types)
|
|
|
{
|
|
|
string PartitionKey = AzureCosmosUtil.GetPartitionKey(type);
|