- 优化 TypeHandlers 支持 DateTime 映射规则;#1634

This commit is contained in:
2881099
2023-10-10 02:07:29 +08:00
parent 1f3f60f6fa
commit 58f261b5e5
30 changed files with 288 additions and 28 deletions

View File

@ -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[] {