This commit is contained in:
sunkaixuan
2017-05-23 17:39:09 +08:00
parent afa5b483c6
commit 40efedc4a9
2 changed files with 3 additions and 1 deletions

View File

@@ -60,6 +60,8 @@ namespace OrmTest.Demo
var getByPrimaryKey = db.Queryable<Student>().InSingle(2);
var getByWhere = db.Queryable<Student>().Where(it => it.Id == 1 || it.Name == "a").ToList();
var getByFuns = db.Queryable<Student>().Where(it => NBORM.IsNullOrEmpty(it.Name)).ToList();
var sum = db.Queryable<Student>().Sum(it=>it.Id);
var isAny = db.Queryable<Student>().Where(it=>it.Id==-1).Any();
}
public static void Page()

View File

@@ -395,7 +395,7 @@ namespace SqlSugar
public bool Any()
{
return this.ToList().IsValuable();
return this.Count()>0;
}
public ISugarQueryable<TResult> Select<T2, TResult>(Expression<Func<T2, TResult>> expression)