From 11ac7f434dad9ceeaa24f11a22de812f72835bbf Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 25 Jan 2019 23:50:25 +0800 Subject: [PATCH] Mapper async bug --- .../SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs index 725b68fd5..60344c413 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs @@ -1564,6 +1564,10 @@ namespace SqlSugar asyncQueryable.Mapper(MapperAction); if (this.MapperActionWithCache != null) asyncQueryable.Mapper(MapperActionWithCache); + if (this.Mappers != null && asyncContext is QueryableProvider) + { + (asyncQueryable as QueryableProvider).Mappers = this.Mappers; + } CopyQueryBuilder(asyncQueryable.QueryBuilder); return asyncQueryable; }