Browse Source

Update error message

pull/30/head
sunkaixuan 2 years ago
parent
commit
39b45ec352
  1. 22
      Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindAccessory.cs

22
Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindAccessory.cs

@ -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;
}

Loading…
Cancel
Save