Commit 7bc338f6 by Neo Turing

优化

parent 1d70062d
...@@ -390,6 +390,7 @@ namespace Kivii.Finances.Transforms ...@@ -390,6 +390,7 @@ namespace Kivii.Finances.Transforms
var entityType = Text.AssemblyUtils.FindType(group.Key); var entityType = Text.AssemblyUtils.FindType(group.Key);
if (entityType == null) continue; if (entityType == null) continue;
if (entityType == typeof(Settlement)) continue; if (entityType == typeof(Settlement)) continue;
if (!typeof(IEntity).IsAssignableFrom(entityType)) continue; //验证当前type是否继承了IEntity,因为方法MakeGenericMethod要求where T : IEntity
var result = _realMethod.MakeGenericMethod(entityType).Invoke(this, new object[2] { conn, group.ToList() }); var result = _realMethod.MakeGenericMethod(entityType).Invoke(this, new object[2] { conn, group.ToList() });
if (result != null) subTrans.Add(result as IDbTransaction); if (result != null) subTrans.Add(result as IDbTransaction);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment