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

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