Paul Stanley
Paul Stanley

Reputation: 2161

System.Data.Spatial or System.Data.Entity.Spatial

I was trying to add an DbGeography type to a test project because I wanted to use the Intersects method to see if some latitude longitude coordinates were within an area stored on a table in a geography type column on SQL Server 2008 R2.

I am confused about the differences between:

System.Data.Entity.Spatial

and

System.Data.Spatial

Is it true that if I want to use the geography data stored on my database that I have to reference Entity Framework in my project?

Does adding Entity Framework to an app add any overhead in terms of memory used in my app?

Upvotes: 2

Views: 1236

Answers (1)

alxersov
alxersov

Reputation: 137

The two classes you mentioned are used by different versions of Entity Framework.

You can use SqlGeography class, STIntersects method instead. This class does not require Enity Framework to be referenced.

Upvotes: 2

Related Questions