|
|
@ -29,15 +29,22 @@ namespace SqlSugar |
|
|
|
{ |
|
|
|
if (dataReader == null) return result; |
|
|
|
while (dataReader.Read()) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
result.Add(entytyList.Build(dataReader)); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
Check.Exception(true, ErrorMessage.EntityMappingError, ex.Message); |
|
|
|
} |
|
|
|
SetAppendColumns(dataReader); |
|
|
|
} |
|
|
|
ExecuteDataAfterFun(context, dataAfterFunc, result); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
catch |
|
|
|
{ |
|
|
|
Check.Exception(true, ErrorMessage.EntityMappingError, ex.Message); |
|
|
|
throw; |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
@ -59,15 +66,22 @@ namespace SqlSugar |
|
|
|
{ |
|
|
|
if (dataReader == null) return result; |
|
|
|
while (await((DbDataReader)dataReader).ReadAsync()) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
result.Add(entytyList.Build(dataReader)); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
Check.Exception(true, ErrorMessage.EntityMappingError, ex.Message); |
|
|
|
} |
|
|
|
SetAppendColumns(dataReader); |
|
|
|
} |
|
|
|
ExecuteDataAfterFun(context, dataAfterFunc, result); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
catch |
|
|
|
{ |
|
|
|
Check.Exception(true, ErrorMessage.EntityMappingError, ex.Message); |
|
|
|
throw; |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|