首页 新闻 搜索 专区 学院

sql server 2008中的geography 数据类型对应c#中的什么类型

0
悬赏园豆:5 [已解决问题] 解决于 2012-11-23 16:40

一般数据库中的字段类型在c#中都有对应的类型,但是sql server 2008中的geography 数据类型对应c#中的什么类型呢?

step的主页 step | 初学一级 | 园豆:2
提问于:2012-09-21 13:06
< >
分享
最佳答案
0

数据库数据类型在C#中的对应

public string ParaChange(string strFlg)
{
switch (strFlg.ToLower())
{
case "bigint": return "Int64";
case "binary": return "Byte[]";
case "bit": return "Boolean";
case "char": return "String";
case "date": return "String";
case "datetime": return "DateTime";
case "datetime2": return "String";
case "datetimeoffset": return "String";
case "decimal": return "Decimal";
case "float": return "Double";
case "geography": return "Byte[]";
case "geometry": return "Byte[]";
case "hierarchyid": return "Byte[]";
case "image": return "Byte[]";
case "int": return "Int32";
case "money": return "Decimal";
case "nchar": return "String";
case "ntext": return "String";
case "numeric": return "Decimal";
case "nvarchar": return "String";
case "real": return "Single";
case "smalldatetime": return "DateTime";
case "smallint": return "Int16";
case "smallmoney": return "Decimal";
case "sql_variant": return "Object";
case "text": return "String";
case "time": return "String";
case "timestamp": return "Byte[]";
case "tinyint": return "Byte";
case "uniqueidentifier": return "Guid";
case "varbinary": return "Byte[]";
case "varchar": return "String";
case "xml": return "String";
default: return "Object";
}
}

收获园豆:5
苏门答腊麝香猫 | 初学一级 |园豆:18 | 2012-09-21 15:02
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册