Update .net core project

This commit is contained in:
sunkaixuan
2022-08-12 17:34:03 +08:00
parent 2ece2aef4a
commit 7ae5dfbaf4
3 changed files with 4 additions and 3 deletions

View File

@@ -331,7 +331,7 @@ namespace SqlSugar
public override string ToGuid(MethodCallExpressionModel model)
{
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)

View File

@@ -100,7 +100,8 @@ namespace SqlSugar
new Type[] { typeof(IDataRecord) }, type, true);
ILGenerator generator = method.GetILGenerator();
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);
this.Context.InitMappingInfo(type);
var columnInfos = this.Context.EntityMaintenance.GetEntityInfo(type).Columns;

View File

@@ -23,7 +23,7 @@ namespace SqlSugar
var result=new JsonInsertResult();
var sqlInfo = this.ToSqlList();
var sqlInfoResult = sqlInfo.First();
if (sqlInfoResult.JsonSqlType == JsonProviderType.InsertableIdentity)
if (sqlInfoResult.JsonSqlType != JsonProviderType.InsertableIdentity)
{
result.InsertCount = this.context.Ado.ExecuteCommand(sqlInfoResult.Sql,sqlInfoResult.Parameters);
}