gpt4 book ai didi

.net - system_type_id 和 SqlDbType 之间是否有干净的转换?

转载 作者:行者123 更新时间:2023-12-02 03:13:26 24 4
gpt4 key购买 nike

除了手动构建映射之外,是否有一种干净的方法可以将 system_type_id(在 sys.types View 中找到)转换为 System.Data.SqlDbType 枚举?它似乎具有内置功能,但我的搜索没有任何结果。

enter image description here

最佳答案

我不认为有一种开箱即用的方式来做你想做的事。如果您查看 SqlClient 的源代码,您会发现他们使用标记为内部的 MetaType 类来执行此操作。

.net core source as of this writing

关于.net - system_type_id 和 SqlDbType 之间是否有干净的转换?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38517130/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com