From d0f78aeb3d3e9a1a1c894ee3d324821ab5faddd5 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sun, 3 Feb 2019 17:22:57 +0800 Subject: [PATCH] Mapper Bug --- .../SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs index 3b8d5d6a9..cec630de3 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs @@ -1329,7 +1329,7 @@ namespace SqlSugar { Action> mapper = (entitys) => { - if (entitys.IsNullOrEmpty()) return; + if (entitys.IsNullOrEmpty()&&entitys.Any()) return; var entity = entitys.First(); var whereCol = filedEntity.Columns.FirstOrDefault(it => it.PropertyName.Equals(filedName, StringComparison.CurrentCultureIgnoreCase)); if (whereCol == null) @@ -1384,7 +1384,7 @@ namespace SqlSugar { Action> mapper = (entitys) => { - if (entitys.IsNullOrEmpty()) return; + if (entitys.IsNullOrEmpty()&&entitys.Any()) return; var entity = entitys.First(); var tEntity = this.Context.EntityMaintenance.GetEntityInfo(); var whereCol = tEntity.Columns.FirstOrDefault(it => it.PropertyName.Equals(filedName, StringComparison.CurrentCultureIgnoreCase));