修改GetProperty为GetObjectProperty,并且发布x.3.1.65

This commit is contained in:
xuejiaming 2021-12-03 17:20:55 +08:00
parent a0b6071d92
commit 48deab923f
6 changed files with 9 additions and 9 deletions

View File

@ -1,9 +1,9 @@
:start :start
::定义版本 ::定义版本
set EFCORE2=2.3.1.64 set EFCORE2=2.3.1.65
set EFCORE3=3.3.1.64 set EFCORE3=3.3.1.65
set EFCORE5=5.3.1.64 set EFCORE5=5.3.1.65
set EFCORE6=6.3.1.64 set EFCORE6=6.3.1.65
::删除所有bin与obj下的文件 ::删除所有bin与obj下的文件
@echo off @echo off

View File

@ -104,7 +104,7 @@ namespace Samples.AbpSharding
{ {
return; return;
} }
var idProperty = entity.GetProperty(nameof(IEntity<Guid>.Id)); var idProperty = entity.GetObjectProperty(nameof(IEntity<Guid>.Id));
var dbGeneratedAttr = ReflectionHelper var dbGeneratedAttr = ReflectionHelper
.GetSingleAttributeOrDefault<DatabaseGeneratedAttribute>( .GetSingleAttributeOrDefault<DatabaseGeneratedAttribute>(

View File

@ -72,7 +72,7 @@ namespace ShardingCore.Extensions
return null; 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); return obj.GetType().GetProperty(propertyName, _bindingFlags);
} }

View File

@ -30,7 +30,7 @@ namespace ShardingCore.Sharding.ReadWriteConfigurations
public string GetConnectionString(string dataSourceName) public string GetConnectionString(string dataSourceName)
{ {
if (!_shardingConnectionStringResolver.ContainsReadWriteDataSourceName(dataSourceName)) if (!_shardingConnectionStringResolver.ContainsReadWriteDataSourceName(dataSourceName))
return _virtualDataSource.GetPhysicDataSource(dataSourceName).ConnectionString; return _virtualDataSource.GetConnectionString(dataSourceName);
return _shardingConnectionStringResolver.GetConnectionString(dataSourceName); return _shardingConnectionStringResolver.GetConnectionString(dataSourceName);
} }

View File

@ -10,7 +10,7 @@ namespace ShardingCore.Test.Shardings
{ {
public class OrderAreaShardingVirtualDataSourceRoute:AbstractShardingOperatorVirtualDataSourceRoute<Order,string> public class OrderAreaShardingVirtualDataSourceRoute:AbstractShardingOperatorVirtualDataSourceRoute<Order,string>
{ {
public override bool EnableRouteParseCompileCache => false; public override bool EnableRouteParseCompileCache => true;
protected override bool EnableHintRoute =>true; protected override bool EnableHintRoute =>true;
private readonly List<string> _dataSources = new List<string>() private readonly List<string> _dataSources = new List<string>()

View File

@ -9,7 +9,7 @@ namespace ShardingCore.Test.Shardings
{ {
public class OrderCreateTimeVirtualTableRoute:AbstractSimpleShardingMonthKeyDateTimeVirtualTableRoute<Order> public class OrderCreateTimeVirtualTableRoute:AbstractSimpleShardingMonthKeyDateTimeVirtualTableRoute<Order>
{ {
public override bool EnableRouteParseCompileCache => false; public override bool EnableRouteParseCompileCache => true;
public override DateTime GetBeginTime() public override DateTime GetBeginTime()
{ {
return new DateTime(2021, 1, 1); return new DateTime(2021, 1, 1);