How to use spatial data with UseChangeTrackingProxies() mode in EF6?

Sergey Korobeynikov 0 Reputation points
2023-02-11T10:04:25.52+00:00

Hello!

Can anyone tell me how to use spatial data such as DbGeography and DbGeometry from System.Data.Entity.Spatial namespace for EF6 and with UseChangeTrackingProxies() mode?

Otherwise we will have an error:

'UseChangeTrackingProxies' requires all entity types to be public, unsealed, have virtual properties, and have a public or protected constructor. 'UseLazyLoadingProxies' requires only the navigation properties be virtual.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,103 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sergey Korobeynikov 0 Reputation points
    2023-02-16T12:48:51.8066667+00:00

    The question is closed. The reason was that the program had several connection settings and one of them did not have the UseNetTopologySuite() option. My apologies :-(

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.