mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
- 优化 TypeHandlers 支持 DateTime 映射规则;#1634
This commit is contained in:
@ -2447,6 +2447,14 @@ namespace FreeSql.Internal
|
||||
);
|
||||
break;
|
||||
case "System.DateTime":
|
||||
if (TypeHandlers.ContainsKey(type))
|
||||
{
|
||||
foreach (var switchFunc in GetDataReaderValueBlockExpressionSwitchTypeFullName)
|
||||
{
|
||||
var switchFuncRet = switchFunc(returnTarget, valueExp, type);
|
||||
if (switchFuncRet != null) return switchFuncRet;
|
||||
}
|
||||
}
|
||||
tryparseExp = Expression.Block(
|
||||
new[] { tryparseVarExp = Expression.Variable(typeof(DateTime)) },
|
||||
new Expression[] {
|
||||
|
Reference in New Issue
Block a user