Browse Source

Update db.WhereClass

pull/4/MERGE
sunkaixuna 3 years ago
parent
commit
59948f8870
  1. 12
      Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs

12
Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs

@ -395,12 +395,20 @@ namespace SqlSugar
} }
} }
cons.ConditionalList.Add(new KeyValuePair<WhereType, ConditionalModel>(WhereType, new ConditionalModel() var data = new KeyValuePair<WhereType, ConditionalModel>(WhereType, new ConditionalModel()
{ {
ConditionalType = ConditionalType.Equal, ConditionalType = ConditionalType.Equal,
FieldName = column.DbColumnName, FieldName = column.DbColumnName,
FieldValue = value.ObjToString() FieldValue = value.ObjToString()
})); });
cons.ConditionalList.Add(data);
if (this.Context.CurrentConnectionConfig.DbType == DbType.PostgreSQL)
{
data.Value.FieldValueConvertFunc = it =>
{
return UtilMethods.ChangeType2(it, value.GetType());
};
}
} }
} }
if (cons.HasValue()) if (cons.HasValue())

Loading…
Cancel
Save