EntityFramework Core for MySql mapping database type Point to my own class

时间:2019-04-17 02:36:25

标签: c# mysql asp.net-core entity-framework-core

I have a table Apartment(location: point)

I am using ASP.NET Core 2.2 with Pomelo.EntityFrameworkCore.MySql Database first to generate my model classes.

I found that this lib doesn't provide type mapping for Point, so it skips generating the Location column every time.

My own Point class looks like:

public class GeoPoint
{
    public double X { get; set; }
    public double Y { get; set; }
    public int SRID { get; set; }
}

So, I am wondering are there any workaround for this?

Thank you

0 个答案:

没有答案