Skip to content

Accessing DbGeography methods/properties #134

@czielin

Description

@czielin

I am now working on querying some fields that are mapped via Entity Framework to the Sql Server geography type. The following two queries:

queryable.Where("p.any(c.geographic.Union(@0).Area == 0)", parameters.ToArray());
queryable.Where("p.any(@0.Difference(c.geographic).IsEmpty)", parameters.ToArray());

result in the following error:

System.Linq.Dynamic.Core.Exceptions.ParseException: 'Methods on type 'DbGeography' are not accessible'

A simple geographic query, like the following, works as expected:

p.any(c.geographic.Intersects(@0))

The parameters object contains a single DbGeography object.

Are the above two queries expected to work? Do I maybe again have the incorrect query syntax?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions