Skip to content

Commit

Permalink
- 简化代码 #1980
Browse files Browse the repository at this point in the history
  • Loading branch information
2881099 committed Feb 18, 2025
1 parent 528bf08 commit 5bba6d3
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Providers/FreeSql.Provider.TDengine/TDengineProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,14 @@ public TDengineProvider(string masterConnectionString, string[] slaveConnectionS
case "TIMESTAMP":
try
{
var value = e.DataReader.GetValue(e.Index);
if (value != null)
e.Value = e.DataReader.GetDateTime(e.Index);
else
e.Value = null;

return;
if (e.DataReader.IsDBNull(e.Index)) e.Value = null;
else e.Value = e.DataReader.GetDateTime(e.Index);
}
catch
{
e.Value = new DateTime();
return;
e.Value = DateTime.MinValue;
}
return;
}
};

Expand Down

0 comments on commit 5bba6d3

Please sign in to comment.