Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite 11.0.0-rc.1

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.

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