mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 04:23:47 +08:00
Update .net core project
This commit is contained in:
@@ -331,7 +331,7 @@ namespace SqlSugar
|
|||||||
public override string ToGuid(MethodCallExpressionModel model)
|
public override string ToGuid(MethodCallExpressionModel model)
|
||||||
{
|
{
|
||||||
var parameter = model.Args[0];
|
var parameter = model.Args[0];
|
||||||
return string.Format(" CAST({0} AS VARCHAR)", parameter.MemberName);
|
return string.Format(" CAST({0} AS UUID)", parameter.MemberName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToDouble(MethodCallExpressionModel model)
|
public override string ToDouble(MethodCallExpressionModel model)
|
||||||
|
@@ -100,7 +100,8 @@ namespace SqlSugar
|
|||||||
new Type[] { typeof(IDataRecord) }, type, true);
|
new Type[] { typeof(IDataRecord) }, type, true);
|
||||||
ILGenerator generator = method.GetILGenerator();
|
ILGenerator generator = method.GetILGenerator();
|
||||||
LocalBuilder result = generator.DeclareLocal(type);
|
LocalBuilder result = generator.DeclareLocal(type);
|
||||||
generator.Emit(OpCodes.Newobj, type.GetConstructor(Type.EmptyTypes));
|
generator.Emit(OpCodes.Newobj, type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic,
|
||||||
|
null, Type.EmptyTypes, null));
|
||||||
generator.Emit(OpCodes.Stloc, result);
|
generator.Emit(OpCodes.Stloc, result);
|
||||||
this.Context.InitMappingInfo(type);
|
this.Context.InitMappingInfo(type);
|
||||||
var columnInfos = this.Context.EntityMaintenance.GetEntityInfo(type).Columns;
|
var columnInfos = this.Context.EntityMaintenance.GetEntityInfo(type).Columns;
|
||||||
|
@@ -23,7 +23,7 @@ namespace SqlSugar
|
|||||||
var result=new JsonInsertResult();
|
var result=new JsonInsertResult();
|
||||||
var sqlInfo = this.ToSqlList();
|
var sqlInfo = this.ToSqlList();
|
||||||
var sqlInfoResult = sqlInfo.First();
|
var sqlInfoResult = sqlInfo.First();
|
||||||
if (sqlInfoResult.JsonSqlType == JsonProviderType.InsertableIdentity)
|
if (sqlInfoResult.JsonSqlType != JsonProviderType.InsertableIdentity)
|
||||||
{
|
{
|
||||||
result.InsertCount = this.context.Ado.ExecuteCommand(sqlInfoResult.Sql,sqlInfoResult.Parameters);
|
result.InsertCount = this.context.Ado.ExecuteCommand(sqlInfoResult.Sql,sqlInfoResult.Parameters);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user