2

Trying to find any reference to utilising the spatial data types in dapper.net from .net core.

We're using point and polygon in our database however are unable to find anything that eludes to what data type to use in the models codeside.

1 Answer 1

1

Try the MySqlGeometry Class:

    public byte[] Location { get; set; }

    public MySqlGeometry LocationAsGeometry
    {
        get
        {
            var geo = new MySqlGeometry(MySqlDbType.Geometry, Location);
            return geo;
        }
    }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.