Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite 11.0.0-preview.6

Npgsql Entity Framework Core provider for PostgreSQL

Npgsql.EntityFrameworkCore.PostgreSQL is the open source EF Core provider for PostgreSQL. It allows you to interact with PostgreSQL via the most widely-used .NET O/RM from Microsoft, and use familiar LINQ syntax to express queries.

This package is a plugin which allows you to interact with spatial data provided by the PostgreSQL PostGIS extension; PostGIS is a mature, standard extension considered to provide top-of-the-line database spatial features. On the .NET side, the plugin adds support for the types from the NetTopologySuite library, allowing you to read and write them directly to PostgreSQL.

To use the plugin, simply add UseNetTopologySuite as below and use NetTopologySuite types in your entity properties:

await using var ctx = new BlogContext();
await ctx.Database.EnsureDeletedAsync();
await ctx.Database.EnsureCreatedAsync();

// Insert a Blog
ctx.Cities.Add(new()
{
    Name = "FooCity",
    Center = new Point(10, 10)
});
await ctx.SaveChangesAsync();

// Query all cities with the given center point
var newBlogs = await ctx.Cities.Where(b => b.Center == new Point(10, 10)).ToListAsync();

public class BlogContext : DbContext
{
    public DbSet<City> Cities { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        => optionsBuilder.UseNpgsql(
            @"Host=myserver;Username=mylogin;Password=mypass;Database=mydatabase",
            o => o.UseNetTopologySuite());
}

public class City
{
    public int Id { get; set; }
    public string Name { get; set; }
    public Point Center { get; set; }
}

The plugin also supports translating many NetTopologySuite methods and properties into corresponding PostGIS operations. For more information, see the NetTopologySuite plugin documentation page.

No packages depend on Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite.

.NET 11.0

Version Downloads Last updated
11.0.0-preview.6 1 21.07.2026
11.0.0-preview.5 1 21.07.2026
11.0.0-preview.4 5 26.05.2026
11.0.0-preview.3 7 04.05.2026
11.0.0-preview.2 5 15.03.2026
11.0.0-preview.1 5 12.02.2026
10.0.3 1 21.07.2026
10.0.2 6 11.06.2026
10.0.1 5 15.03.2026
10.0.0 9 06.12.2025
10.0.0-rc.2 9 20.11.2025
10.0.0-rc.1 9 22.11.2025
10.0.0-preview.7 7 08.12.2025
10.0.0-preview.5 10 04.07.2025
10.0.0-preview.3 12 29.05.2025
10.0.0-preview.2 11 29.05.2025
10.0.0-preview.1 12 13.03.2025
9.0.4 12 14.03.2025
9.0.3 13 14.03.2025
9.0.2 14 16.01.2025
9.0.1 14 23.01.2025
9.0.0 13 24.01.2025
9.0.0-rc.2 12 23.01.2025
9.0.0-rc.1 12 23.01.2025
9.0.0-preview.7 20 03.01.2025
9.0.0-preview.3 13 24.01.2025
9.0.0-preview.2 14 03.01.2025
9.0.0-preview.1 16 23.01.2025
8.0.11 14 18.02.2025
8.0.10 15 27.01.2025
8.0.8 17 03.01.2025
8.0.4 15 21.06.2024
8.0.2 12 24.01.2025
8.0.0 16 03.01.2025
8.0.0-rc.2 13 28.01.2025
8.0.0-rc.1 12 29.01.2025
8.0.0-preview.7 13 24.01.2025
8.0.0-preview.4 17 03.01.2025
8.0.0-preview.3 14 23.01.2025
8.0.0-preview.2 15 19.02.2025
8.0.0-preview.1 12 18.02.2025
7.0.18 15 03.01.2025
7.0.11 14 24.01.2025
7.0.4 17 03.01.2025
7.0.3 15 24.01.2025
7.0.1 12 23.01.2025
7.0.0 13 23.01.2025
7.0.0-rc.2 16 23.01.2025
7.0.0-rc.1 13 23.01.2025
7.0.0-preview.7 13 03.01.2025
7.0.0-preview.6 13 13.02.2025
7.0.0-preview.5 15 03.02.2025
7.0.0-preview.4 12 29.01.2025
7.0.0-preview.3 13 24.01.2025
7.0.0-preview.2 12 03.01.2025
7.0.0-preview.1 15 03.01.2025
6.0.29 21 03.01.2025
6.0.22 18 03.01.2025
6.0.8 15 03.01.2025
6.0.7 13 28.01.2025
6.0.6 13 28.01.2025
6.0.5 15 03.01.2025
6.0.4 16 03.01.2025
6.0.3 14 03.01.2025
6.0.2 14 24.01.2025
6.0.1 15 03.01.2025
6.0.0 14 03.01.2025
6.0.0-rc.2 21 23.01.2025
6.0.0-rc.1 16 28.01.2025
6.0.0-preview7 13 23.01.2025
6.0.0-preview6 15 23.01.2025
6.0.0-preview5 16 23.01.2025
6.0.0-preview4 16 03.01.2025
6.0.0-preview3 13 23.01.2025
6.0.0-preview2 14 10.01.2025
6.0.0-preview1 17 03.01.2025
5.0.10 20 03.01.2025
5.0.7 13 03.01.2025
5.0.6 14 03.01.2025
5.0.5.1 16 03.01.2025
5.0.5 15 03.01.2025
5.0.2 16 23.01.2025
5.0.1 12 23.01.2025
5.0.0 16 03.01.2025
5.0.0-rc2 12 19.02.2025
5.0.0-rc1 12 24.01.2025
5.0.0-preview8 13 18.02.2025
5.0.0-preview7 12 23.01.2025
5.0.0-preview6 14 03.01.2025
5.0.0-preview5 13 24.01.2025
5.0.0-preview4 17 03.01.2025
5.0.0-preview3 13 28.01.2025
5.0.0-preview2 15 03.01.2025
5.0.0-preview.2.20120.8 14 23.01.2025
3.1.18 14 24.01.2025
3.1.11 15 24.01.2025
3.1.4 16 03.01.2025
3.1.3 15 03.01.2025
3.1.2 19 03.01.2025
3.1.1 14 24.01.2025
3.1.0 12 18.02.2025
3.1.0-preview3 12 24.01.2025
3.1.0-preview2 16 24.01.2025
3.0.1 12 24.01.2025
3.0.0 16 24.01.2025
3.0.0-preview9 17 03.01.2025
3.0.0-preview5 12 23.01.2025
3.0.0-preview4 14 23.01.2025
3.0.0-preview3 15 28.01.2025
3.0.0-preview1 17 24.01.2025
2.2.4 14 24.01.2025
2.2.0 13 23.01.2025
2.1.1 13 19.02.2025
2.1.0 14 24.01.2025
2.1.0-rc1 13 23.01.2025