mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
.Select new {} Support for strong null
This commit is contained in:
parent
56f1146370
commit
601119514c
@ -436,6 +436,14 @@ namespace OrmTest.Demo
|
||||
var test41 = db.Queryable<Student>().Where(it => it.Id==((it.Id==1?2:3)==2?1:2)).ToList();
|
||||
var test42 = db.Queryable<Student>().Where(it => new int[] { 1, 2, 3 }.Contains(1)).ToList();
|
||||
var test43 = db.Queryable<Student>().Where(it => new int[] { 1, 2, 3 }.Contains(it.Id)).ToList();
|
||||
|
||||
var test44 = db.Queryable<Student>().Select(it=>new {
|
||||
x= SqlFunc.Subqueryable<DataTestInfo>().Where(x => false).Sum(x => x.Decimal1)
|
||||
}).ToList();
|
||||
decimal? p = null;
|
||||
var test45 = db.Queryable<DataTestInfo>().Select(it => new {
|
||||
x =p
|
||||
}).ToList();
|
||||
}
|
||||
public static void Page()
|
||||
{
|
||||
|
@ -144,7 +144,7 @@ namespace SqlSugar
|
||||
if (readerValues.Any(it => it.Key.Equals(name, StringComparison.CurrentCultureIgnoreCase)))
|
||||
{
|
||||
var addValue = readerValues.ContainsKey(name) ? readerValues[name] : readerValues.First(it => it.Key.Equals(name, StringComparison.CurrentCultureIgnoreCase)).Value;
|
||||
if (addValue == DBNull.Value)
|
||||
if (addValue == DBNull.Value||addValue==null)
|
||||
{
|
||||
if (item.PropertyType.IsIn(UtilConstants.IntType, UtilConstants.DecType, UtilConstants.DobType, UtilConstants.ByteType))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user