码迷,mamicode.com
首页 > 数据库 > 详细

C# - Sql数据类型的对应关系

时间:2015-01-06 15:09:03      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:

<Language From="SQL" To="C#">
   <Type From="bigint" To="long" />
   <Type From="binary" To="object" />
   <Type From="bit" To="bool" />
   <Type From="char" To="string" />
   <Type From="datetime" To="DateTime" />
   <Type From="decimal" To="decimal" />
   <Type From="float" To="double" />
   <Type From="image" To="byte[]" />
   <Type From="int" To="int" />
   <Type From="money" To="decimal" />
   <Type From="nchar" To="string" />
   <Type From="ntext" To="string" />
   <Type From="numeric" To="decimal" />
   <Type From="nvarchar" To="string" />
   <Type From="real" To="float" />
   <Type From="smalldatetime" To="DateTime" />
   <Type From="smallint" To="short" />
   <Type From="smallmoney" To="decimal" />
   <Type From="text" To="string" />
   <Type From="timestamp" To="byte[]" />
   <Type From="tinyint" To="byte" />
   <Type From="uniqueidentifier" To="Guid" />
   <Type From="varbinary" To="byte[]" />
   <Type From="varchar" To="string" />
   <Type From="xml" To="string" />
   <Type From="sql_variant" To="object" />
</Language>
<Language From="SQL" To="C# System Types">
   <Type From="bigint" To="System.Int64" />
   <Type From="binary" To="System.Object" />
   <Type From="bit" To="System.Boolean" />
   <Type From="char" To="System.String" />
   <Type From="datetime" To="System.DateTime" />
   <Type From="decimal" To="System.Decimal" />
   <Type From="float" To="System.Double" />
   <Type From="image" To="System.Byte[]" />
   <Type From="int" To="System.Int32" />
   <Type From="money" To="System.Decimal" />
   <Type From="nchar" To="System.String" />
   <Type From="ntext" To="System.String" />
   <Type From="numeric" To="System.Decimal" />
   <Type From="nvarchar" To="System.String" />
   <Type From="real" To="System.Single" />
   <Type From="smalldatetime" To="System.DateTime" />
   <Type From="smallint" To="System.Int16" />
   <Type From="smallmoney" To="System.Decimal" />
   <Type From="text" To="System.String" />
   <Type From="timestamp" To="System.Byte[]" />
   <Type From="tinyint" To="System.Byte" />
   <Type From="uniqueidentifier" To="System.Guid" />
   <Type From="varbinary" To="System.Byte[]" />
   <Type From="varchar" To="System.String" />
   <Type From="xml" To="System.String" />
   <Type From="sql_variant" To="System.Object" />
</Language>

ref: http://blog.csdn.net/leftfist/article/details/9129039

C# - Sql数据类型的对应关系

标签:

原文地址:http://www.cnblogs.com/listened/p/4206084.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!