mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-24 16:18:47 +08:00
Synchronization code
This commit is contained in:
parent
fcfc86e2ee
commit
e9fe84d1e5
@ -3,6 +3,7 @@ using System.Collections;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SqlSugar
|
namespace SqlSugar
|
||||||
{
|
{
|
||||||
@ -19,5 +20,12 @@ namespace SqlSugar
|
|||||||
var result= inertable.GetType().GetMethod("ExecuteCommand").Invoke(inertable,new object[] { });
|
var result= inertable.GetType().GetMethod("ExecuteCommand").Invoke(inertable,new object[] { });
|
||||||
return (int)result;
|
return (int)result;
|
||||||
}
|
}
|
||||||
|
public async Task<int> ExecuteCommandAsync()
|
||||||
|
{
|
||||||
|
if (Context == null) return 0;
|
||||||
|
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||||
|
var result = inertable.GetType().GetMethod("ExecuteCommandAsync").Invoke(inertable, new object[] { });
|
||||||
|
return await(Task<int>)result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ using System.Collections;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SqlSugar
|
namespace SqlSugar
|
||||||
{
|
{
|
||||||
@ -19,5 +20,12 @@ namespace SqlSugar
|
|||||||
var result= inertable.GetType().GetMethod("ExecuteCommand").Invoke(inertable,new object[] { });
|
var result= inertable.GetType().GetMethod("ExecuteCommand").Invoke(inertable,new object[] { });
|
||||||
return (int)result;
|
return (int)result;
|
||||||
}
|
}
|
||||||
|
public async Task<int> ExecuteCommandAsync()
|
||||||
|
{
|
||||||
|
if (Context == null) return 0;
|
||||||
|
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||||
|
var result = inertable.GetType().GetMethod("ExecuteCommandAsync").Invoke(inertable, new object[] { });
|
||||||
|
return await (Task<int>)result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ using System.Collections;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace SqlSugar
|
namespace SqlSugar
|
||||||
{
|
{
|
||||||
@ -19,5 +20,13 @@ namespace SqlSugar
|
|||||||
var result= inertable.GetType().GetMethod("ExecuteCommand").Invoke(inertable,new object[] { });
|
var result= inertable.GetType().GetMethod("ExecuteCommand").Invoke(inertable,new object[] { });
|
||||||
return (int)result;
|
return (int)result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<int> ExecuteCommandAsync()
|
||||||
|
{
|
||||||
|
if (Context == null) return 0;
|
||||||
|
var inertable = MethodInfo.Invoke(Context, new object[] { objectValue });
|
||||||
|
var result = inertable.GetType().GetMethod("ExecuteCommandAsync").Invoke(inertable, new object[] { });
|
||||||
|
return await (Task<int>)result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,6 +172,10 @@ namespace SqlSugar
|
|||||||
this.DbType = System.Data.DbType.Date;
|
this.DbType = System.Data.DbType.Date;
|
||||||
this.Value = UtilMethods.DateOnlyToDateTime(this.Value);
|
this.Value = UtilMethods.DateOnlyToDateTime(this.Value);
|
||||||
}
|
}
|
||||||
|
else if (type?.FullName == "Newtonsoft.Json.Linq.JObject" || type?.FullName == "Newtonsoft.Json.Linq.JArray" || type?.FullName == "Newtonsoft.Json.Linq.JValue")
|
||||||
|
{
|
||||||
|
this.Value =this.Value==null?default(string):this.Value.ObjToString() ;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public SugarParameter(string name, object value, bool isOutput)
|
public SugarParameter(string name, object value, bool isOutput)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package >
|
<package >
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>SqlSugarCore</id>
|
<id>SqlSugarCore</id>
|
||||||
<version>5.1.3.50</version>
|
<version>5.1.3.51-preview05</version>
|
||||||
<authors>sunkaixuan</authors>
|
<authors>sunkaixuan</authors>
|
||||||
<owners>果糖大数据科技</owners>
|
<owners>果糖大数据科技</owners>
|
||||||
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
|
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<package >
|
<package >
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>SqlSugarCoreNoDrive</id>
|
<id>SqlSugarCoreNoDrive</id>
|
||||||
<version>5.1.3.50</version>
|
<version>5.1.3.51-preview05</version>
|
||||||
<authors>sunkaixuan</authors>
|
<authors>sunkaixuan</authors>
|
||||||
<owners>Landa</owners>
|
<owners>Landa</owners>
|
||||||
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
|
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
|
||||||
|
Loading…
Reference in New Issue
Block a user