Browse Source

Synchronization code

pull/31/head
sunkaixuan 2 years ago
parent
commit
e9fe84d1e5
  1. 8
      Src/Asp.NetCore2/SqlSugar/Abstract/DeleteProvider/DeleteMethodInfo.cs
  2. 8
      Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertMethodInfo.cs
  3. 9
      Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateMethodInfo.cs
  4. 4
      Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs
  5. 2
      Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec
  6. 2
      Src/Asp.NetCore2/SqlSugar/SqlSugarForCoreNoDrive.nuspec

8
Src/Asp.NetCore2/SqlSugar/Abstract/DeleteProvider/DeleteMethodInfo.cs

@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace SqlSugar
{
@ -19,5 +20,12 @@ namespace SqlSugar
var result= inertable.GetType().GetMethod("ExecuteCommand").Invoke(inertable,new object[] { });
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;
}
}
}

8
Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/InsertMethodInfo.cs

@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace SqlSugar
{
@ -19,5 +20,12 @@ namespace SqlSugar
var result= inertable.GetType().GetMethod("ExecuteCommand").Invoke(inertable,new object[] { });
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;
}
}
}

9
Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateMethodInfo.cs

@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace SqlSugar
{
@ -19,5 +20,13 @@ namespace SqlSugar
var result= inertable.GetType().GetMethod("ExecuteCommand").Invoke(inertable,new object[] { });
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;
}
}
}

4
Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs

@ -172,6 +172,10 @@ namespace SqlSugar
this.DbType = System.Data.DbType.Date;
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)

2
Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec

@ -2,7 +2,7 @@
<package >
<metadata>
<id>SqlSugarCore</id>
<version>5.1.3.50</version>
<version>5.1.3.51-preview05</version>
<authors>sunkaixuan</authors>
<owners>果糖大数据科技</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>

2
Src/Asp.NetCore2/SqlSugar/SqlSugarForCoreNoDrive.nuspec

@ -2,7 +2,7 @@
<package >
<metadata>
<id>SqlSugarCoreNoDrive</id>
<version>5.1.3.50</version>
<version>5.1.3.51-preview05</version>
<authors>sunkaixuan</authors>
<owners>Landa</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>

Loading…
Cancel
Save