优化无路由匹配的的错误提示说明

This commit is contained in:
xuejiaming 2022-08-02 21:33:44 +08:00
parent aae76ee587
commit a7a1580742
1 changed files with 2 additions and 2 deletions

View File

@ -79,10 +79,10 @@ namespace ShardingCore.Core.VirtualRoutes.TableRoutes.Abstractions
}
var shardingKeyToTail = ShardingKeyToTail(shardingKey);
var filterTails = GetTails().Where(o => o== shardingKeyToTail).ToList();
var filterTails = GetTails().Where(o => o == shardingKeyToTail).ToList();
if (filterTails.IsEmpty())
{
throw new ShardingCoreException($"sharding key route not match {EntityMetadata.EntityType} -> [{EntityMetadata.ShardingTableProperty.Name}] ->【{shardingKey}】 all tails ->[{string.Join(",", filterTails)}]");
throw new ShardingCoreException($"sharding key route not match {EntityMetadata.EntityType} -> [{EntityMetadata.ShardingTableProperty.Name}] -> [{shardingKey}] -> sharding key to tail :[{shardingKeyToTail}] -> all tails ->[{string.Join(",", GetTails())}]");
}
if (filterTails.Count > 1)