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

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