mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 02:29:39 +08:00
StorageableByObject.SplitTable()
This commit is contained in:
@@ -63,6 +63,19 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public StorageableSplitTableMethodInfo SplitTable()
|
||||||
|
{
|
||||||
|
object objectValue = null;
|
||||||
|
MethodInfo method = GetSaveMethod(ref objectValue);
|
||||||
|
if (method == null) return new StorageableSplitTableMethodInfo(null);
|
||||||
|
method = objectValue.GetType().GetMethod("SplitTable");
|
||||||
|
objectValue = method.Invoke(objectValue, new object[] { });
|
||||||
|
StorageableSplitTableMethodInfo result = new StorageableSplitTableMethodInfo(null);
|
||||||
|
result.ObjectValue = objectValue;
|
||||||
|
result.Method = method;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class StorageableAsMethodInfo
|
public class StorageableAsMethodInfo
|
||||||
@@ -85,4 +98,20 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class StorageableSplitTableMethodInfo
|
||||||
|
{
|
||||||
|
private StorageableSplitTableMethodInfo() { }
|
||||||
|
private string type;
|
||||||
|
public StorageableSplitTableMethodInfo(string type)
|
||||||
|
{
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
internal object ObjectValue { get; set; }
|
||||||
|
internal MethodInfo Method { get; set; }
|
||||||
|
public int ExecuteCommand()
|
||||||
|
{
|
||||||
|
var newObj = ObjectValue.GetType().GetMethod("ExecuteCommand").Invoke(ObjectValue, new object[] { });
|
||||||
|
return (int)newObj;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user