From 48deab923fc0aed5a5569867a2d604d6c93df45a Mon Sep 17 00:00:00 2001 From: xuejiaming <326308290@qq.com> Date: Fri, 3 Dec 2021 17:20:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9GetProperty=E4=B8=BAGetObject?= =?UTF-8?q?Property,=E5=B9=B6=E4=B8=94=E5=8F=91=E5=B8=83x.3.1.65?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nuget-publish.bat | 8 ++++---- .../Samples.AbpSharding/AbstractShardingAbpDbContext.cs | 2 +- src/ShardingCore/Extensions/ObjectExtension.cs | 2 +- .../ReadWriteConnectionStringManager.cs | 2 +- .../Shardings/OrderAreaShardingVirtualDataSourceRoute.cs | 2 +- .../Shardings/OrderCreateTimeVirtualTableRoute.cs | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/nuget-publish.bat b/nuget-publish.bat index 7da650d8..11592c20 100644 --- a/nuget-publish.bat +++ b/nuget-publish.bat @@ -1,9 +1,9 @@ :start ::定义版本 -set EFCORE2=2.3.1.64 -set EFCORE3=3.3.1.64 -set EFCORE5=5.3.1.64 -set EFCORE6=6.3.1.64 +set EFCORE2=2.3.1.65 +set EFCORE3=3.3.1.65 +set EFCORE5=5.3.1.65 +set EFCORE6=6.3.1.65 ::删除所有bin与obj下的文件 @echo off diff --git a/samples/Samples.AbpSharding/AbstractShardingAbpDbContext.cs b/samples/Samples.AbpSharding/AbstractShardingAbpDbContext.cs index e62fb677..266aef55 100644 --- a/samples/Samples.AbpSharding/AbstractShardingAbpDbContext.cs +++ b/samples/Samples.AbpSharding/AbstractShardingAbpDbContext.cs @@ -104,7 +104,7 @@ namespace Samples.AbpSharding { return; } - var idProperty = entity.GetProperty(nameof(IEntity.Id)); + var idProperty = entity.GetObjectProperty(nameof(IEntity.Id)); var dbGeneratedAttr = ReflectionHelper .GetSingleAttributeOrDefault( diff --git a/src/ShardingCore/Extensions/ObjectExtension.cs b/src/ShardingCore/Extensions/ObjectExtension.cs index 1ca62c20..c6e2b5d2 100644 --- a/src/ShardingCore/Extensions/ObjectExtension.cs +++ b/src/ShardingCore/Extensions/ObjectExtension.cs @@ -72,7 +72,7 @@ namespace ShardingCore.Extensions return null; } } - public static PropertyInfo GetProperty(this object obj, string propertyName) + public static PropertyInfo GetObjectProperty(this object obj, string propertyName) { return obj.GetType().GetProperty(propertyName, _bindingFlags); } diff --git a/src/ShardingCore/Sharding/ReadWriteConfigurations/ReadWriteConnectionStringManager.cs b/src/ShardingCore/Sharding/ReadWriteConfigurations/ReadWriteConnectionStringManager.cs index 8d1e07e7..6818b24c 100644 --- a/src/ShardingCore/Sharding/ReadWriteConfigurations/ReadWriteConnectionStringManager.cs +++ b/src/ShardingCore/Sharding/ReadWriteConfigurations/ReadWriteConnectionStringManager.cs @@ -30,7 +30,7 @@ namespace ShardingCore.Sharding.ReadWriteConfigurations public string GetConnectionString(string dataSourceName) { if (!_shardingConnectionStringResolver.ContainsReadWriteDataSourceName(dataSourceName)) - return _virtualDataSource.GetPhysicDataSource(dataSourceName).ConnectionString; + return _virtualDataSource.GetConnectionString(dataSourceName); return _shardingConnectionStringResolver.GetConnectionString(dataSourceName); } diff --git a/test/ShardingCore.Test/Shardings/OrderAreaShardingVirtualDataSourceRoute.cs b/test/ShardingCore.Test/Shardings/OrderAreaShardingVirtualDataSourceRoute.cs index dc5a0667..f96d198e 100644 --- a/test/ShardingCore.Test/Shardings/OrderAreaShardingVirtualDataSourceRoute.cs +++ b/test/ShardingCore.Test/Shardings/OrderAreaShardingVirtualDataSourceRoute.cs @@ -10,7 +10,7 @@ namespace ShardingCore.Test.Shardings { public class OrderAreaShardingVirtualDataSourceRoute:AbstractShardingOperatorVirtualDataSourceRoute { - public override bool EnableRouteParseCompileCache => false; + public override bool EnableRouteParseCompileCache => true; protected override bool EnableHintRoute =>true; private readonly List _dataSources = new List() diff --git a/test/ShardingCore.Test/Shardings/OrderCreateTimeVirtualTableRoute.cs b/test/ShardingCore.Test/Shardings/OrderCreateTimeVirtualTableRoute.cs index 8d8bec03..93df8fe9 100644 --- a/test/ShardingCore.Test/Shardings/OrderCreateTimeVirtualTableRoute.cs +++ b/test/ShardingCore.Test/Shardings/OrderCreateTimeVirtualTableRoute.cs @@ -9,7 +9,7 @@ namespace ShardingCore.Test.Shardings { public class OrderCreateTimeVirtualTableRoute:AbstractSimpleShardingMonthKeyDateTimeVirtualTableRoute { - public override bool EnableRouteParseCompileCache => false; + public override bool EnableRouteParseCompileCache => true; public override DateTime GetBeginTime() { return new DateTime(2021, 1, 1);