Skip to content

Commit 952df62

Browse files
committed
Merge branch 'master' of https://github.com/dotnetcore/SmartSql
2 parents 64e3d52 + bf7fa0a commit 952df62

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/SmartSql/Middlewares/CommandExecuterMiddleware.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ private void SetResultData<TResult>(object dbResult, SingleResultContext<TResult
7373
var convertType = singleResult.ResultType;
7474
convertType = Nullable.GetUnderlyingType(convertType) ?? convertType;
7575

76+
if (convertType.IsInstanceOfType(dbResult))
77+
{
78+
singleResult.SetData(dbResult);
79+
return;
80+
}
81+
7682
if (convertType.IsEnum)
7783
{
7884
singleResult.SetData(Enum.ToObject(convertType, dbResult));

0 commit comments

Comments
 (0)