|
@@ -114,7 +114,12 @@ 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>(_optionsMonitor.Get("Default").ScanModel);
|
|
|
|
|
|
+ List<Type> types = new List<Type>() ;
|
|
|
|
+ try {
|
|
|
|
+ types = ReflectorExtensions.GetAllTypeAsAttribute<CosmosDBAttribute>(_optionsMonitor.Get("Default").ScanModel);
|
|
|
|
+ } catch(Exception e) {
|
|
|
|
+ Console.WriteLine(e.StackTrace);
|
|
|
|
+ }
|
|
foreach (Type type in types)
|
|
foreach (Type type in types)
|
|
{
|
|
{
|
|
string PartitionKey = AzureCosmosUtil.GetPartitionKey(type);
|
|
string PartitionKey = AzureCosmosUtil.GetPartitionKey(type);
|