什么是C#相当于在.NET框架4.0地理SQL Server的数据类型? [英] What is C# equivalent of geography sql server datatype in .net framework 4.0?

查看:179
本文介绍了什么是C#相当于在.NET框架4.0地理SQL Server的数据类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用.NET 4.0框架网Web应用程序。

net web application using .net 4.0 framework.

我有一个存储过程,它接受在SQL Server 2008 R2的地理数据类型。

I have a Stored Procedure which accepts geography datatype in sql server 2008 R2.

我想从C#代码数据插入到SQL Server中。

I want to insert data from C# code into SQL Server.

但我无法找到我应该在C#中使用的数据类型,它相当于SQL Server 2008的数据类型。

But I'm not able to find which datatype I should use in C# that is equivalent to SQL Server 2008 datatype.

推荐答案

如果您使用的是实体框架,那么你搜索的数据类型是DbGeography。

If you are using entity-framework then the datatype you search is DbGeography.

下面是关于DbGeography对象的一些信息 - >的详细信息

Here is some more information about DbGeography object -> Details.

这篇关于什么是C#相当于在.NET框架4.0地理SQL Server的数据类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆