I got the following error when I generated the code first migration.
The property 'Scheme.Polygon' is of type 'Point' which is not supported by current database provider. Either change the property CLR type or ignore the property using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.
-----------There are what I did------------
2. Entity model:
```C#
using NetTopologySuite.Geometries;
public class Scheme
{
public Point Polygon { get; set; }
}
DbContext:
```C#
protected override void OnModelCreating(ModelBuilder builder)
{
builder.HasPostgresExtension("postgis");
base.OnModelCreating(builder);
builder.Entity<Scheme>(options =>
{
options.Property(m => m.Polygon).HasColumnType("geography");
});
}
```
I am using .net core 2.1, entity framework core & postgresql 10.
Thanks!
I'm running into the exact same problem. Didn't find any working solution as of yet.
Possibly the same issue being investigated in #553. Could you take a look and let us know if you believe this is a separate issue?
If you believe it is distinct, could you please post a complete repro for us to clone and investigate?
Ok, I was missing the mapping part:
b.Property(m => m.Coordinates).HasColumnType("geography");
Closing as no additional info was provided within 7 days.
Please feel free to post back here with the relevant information and we can reopen if necessary.
Most helpful comment
Ok, I was missing the mapping part:
b.Property(m => m.Coordinates).HasColumnType("geography");