i got a problem selecting some data from my postgres-DB
When i do i got an exception:
first of all i try to create a point-geometry:NetTopologySuite spatial service provider value checking failed. Unexpected provider value type 'Microsoft.SqlServer.Types.SqlGeometry'.
Code: Select all
var bm_dop = DbGeometry.FromText("Point(" + x_coord_bm_dop + " " + y_coord_bm_dop + ")", 25832);Code: Select all
var bildvorhanden = db.bild.Where(x => x.bildflug_id == bildflug && x.ausgefloeht == false).OrderBy(x => x.bildmitte.Distance(bm_dop)).First();i use the folowing things:
EF 5
dotconnect 7.13.1366.0
Postgis 1.5.8
Postgres 9.1.5
Nettopologysuite 1.13.2
in my App.config i have the following entrys:
Code: Select all
<configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="Devart.Data.PostgreSql.Entity" type="Devart.Data.PostgreSql.Entity.Configuration.PgSqlEntityProviderConfigurationSection, Devart.Data.PostgreSql.Entity.EF5, Version=7.13.1366.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
  </configSections>
 <system.data>
    <DbProviderFactories>
      <remove invariant="Devart.Data.PostgreSql" />
      <add name="dotConnect for PostgreSQL" invariant="Devart.Data.PostgreSql" description="Devart dotConnect for PostgreSQL" type="Devart.Data.PostgreSql.PgSqlProviderFactory, Devart.Data.PostgreSql, Version=7.13.1366.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </DbProviderFactories>
  </system.data>
  <Devart.Data.PostgreSql.Entity xmlns="http://devart.com/schemas/Devart.Data.PostgreSql.Entity/1.0">
    <SpatialOptions SpatialServiceType="NetTopologySuite" />
  </Devart.Data.PostgreSql.Entity> 
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
      <assemblyIdentity name="NetTopologySuite" publicKeyToken="f580a05016ebada1" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.13.3.0" newVersion="1.13.3.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  </configuration>Thx for helping