This commit is contained in:
sunkaixuan
2019-02-06 18:04:56 +08:00
parent 7087b10a2a
commit 09e443544f
2 changed files with 7 additions and 1 deletions

View File

@@ -397,6 +397,7 @@ namespace OrmTest.Demo
var test10 = db.Queryable<Student>(db.Queryable<Student>().Select(it => new Student() { Name = it.Name.Substring(0, 1) })).GroupBy(it => it.Name).ToList(); ;
var test11 = db.Queryable<Student>().Distinct().ToList();
var test12 = db.Queryable<Student>().Distinct().Select(it=>new Student{ Name=it.Name }).ToList();
var test13 = db.Queryable<Student>().Where(it=>DateTime.Parse("2014-1-1")==DateTime.Now).Where(it => Boolean.Parse("true") ==true).ToList();
}
public static void Page()
{

View File

@@ -468,6 +468,8 @@ namespace SqlSugar
return this.Context.DbMehtods.ToInt64(model);
case "ToDate":
return this.Context.DbMehtods.ToDate(model);
case "ToDateTime":
return this.Context.DbMehtods.ToDate(model);
case "ToTime":
return this.Context.DbMehtods.ToTime(model);
case "ToString":
@@ -481,6 +483,8 @@ namespace SqlSugar
return this.Context.DbMehtods.ToDouble(model);
case "ToBool":
return this.Context.DbMehtods.ToBool(model);
case "ToBoolean":
return this.Context.DbMehtods.ToBool(model);
case "Substring":
return this.Context.DbMehtods.Substring(model);
case "Replace":
@@ -552,7 +556,8 @@ namespace SqlSugar
UtilConstants.FloatType,
UtilConstants.ShortType,
UtilConstants.LongType,
UtilConstants.IntType))
UtilConstants.IntType,
UtilConstants.BoolType))
{
TempParseType = expression.Method.DeclaringType;
return true;