sql server 2008中的geography 数据类型对应c#中的什么类型
展开全部
您好,很高兴为您解答。
数据库数据类型在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";
}
}
如若满意,请点击右侧【采纳答案】,如若还有问题,请点击【追问】
希望我的回答对您有所帮助,望采纳!
~ O(∩_∩)O~
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询