mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 14:04:44 +08:00
Update Queryable.WhereClass
This commit is contained in:
parent
5eb1a61f4c
commit
48d093a191
@ -53,6 +53,12 @@ namespace OrmTest
|
||||
type2 = UnitType.b
|
||||
})
|
||||
.Where(it => true).ExecuteCommand();
|
||||
db.Queryable<Unit00Z1string1>().WhereClass(new Unit00Z1string1()
|
||||
{
|
||||
|
||||
type = UnitType.a,
|
||||
type2 = UnitType.b
|
||||
}).ToList();
|
||||
}
|
||||
private static void Int()
|
||||
{
|
||||
@ -74,6 +80,12 @@ namespace OrmTest
|
||||
}
|
||||
Db.Updateable<Unit00Z11C12>(x3).WhereColumns(it => it.type).ExecuteCommand();
|
||||
var x4 = Db.Queryable<Unit00Z11C12>().ToList();
|
||||
|
||||
Db.Queryable<Unit00Z11C12>().WhereClass(new Unit00Z11C12() {
|
||||
|
||||
type= UnitType.a,
|
||||
type2=UnitType.b
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
public class Unit00Z11C12
|
||||
|
@ -485,6 +485,18 @@ namespace SqlSugar
|
||||
FieldName = column.DbColumnName,
|
||||
FieldValue = value.ObjToString()
|
||||
});
|
||||
if (value != null && value.GetType().IsEnum())
|
||||
{
|
||||
if (this.Context.CurrentConnectionConfig?.MoreSettings?.TableEnumIsString == true)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
data.Value.FieldValue = Convert.ToInt64(value).ObjToString();
|
||||
}
|
||||
|
||||
}
|
||||
cons.ConditionalList.Add(data);
|
||||
if (this.Context.CurrentConnectionConfig.DbType == DbType.PostgreSQL)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user