![]() |
VOOZH | about |
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite --version 10.0.2
NuGet\Install-Package Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite -Version 10.0.2
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="10.0.2" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="10.0.2" />Directory.Packages.props
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" />Project file
paket add Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite --version 10.0.2
#r "nuget: Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite, 10.0.2"
#:package Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite@10.0.2
#addin nuget:?package=Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite&version=10.0.2Install as a Cake Addin
#tool nuget:?package=Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite&version=10.0.2Install as a Cake Tool
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.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite:
| Package | Downloads |
|---|---|
|
CoreMore
Package Description |
|
|
EFCore.Sharding.PostgreSql
Package Description |
|
|
NeuroSpeech.EFCoreLiveMigration.PostGreSql
Package Description |
|
|
SER.Graphql.Reflection.NetCore
This is a complement to graphql-dotnet (https://github.com/graphql-dotnet/graphql-dotnet) to avoid boilerplate |
|
|
EntityFrameworkCore.Generator.Core
.NET Core command-line (CLI) tool to generate Entity Framework Core source files. |
Showing the top 11 popular GitHub repositories that depend on Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite:
| Repository | Stars |
|---|---|
|
ChilliCream/graphql-platform
Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Nitro the awesome Monaco based GraphQL IDE.
|
|
|
borisdj/EFCore.BulkExtensions
Entity Framework EF Core efcore Bulk Batch Extensions with BulkCopy in .Net for Insert Update Delete Read (CRUD), Truncate and SaveChanges operations on SQL Server, PostgreSQL, MySQL, SQLite, Oracle
|
|
|
ErikEJ/EFCorePowerTools
Entity Framework Core Power Tools - reverse engineering, migrations and model visualization in Visual Studio & CLI
|
|
|
Squidex/squidex
Headless CMS and Content Managment Hub
|
|
|
abpframework/abp-samples
Sample solutions built with the ABP Framework
|
|
|
Coldairarrow/EFCore.Sharding
Database Sharding For EFCore
|
|
|
loresoft/EntityFrameworkCore.Generator
Generate Entity Framework Core model from an existing database
|
|
|
zLulus/NotePractice
My_Note 笔记练习demo
|
|
|
shinyorg/templates
dotnet CLI & Visual Studio Templates
|
|
|
PhenX/PhenX.EntityFrameworkCore.BulkInsert
Super fast bulk insertion for Entity Framework Core on SQL Server, PostgreSQL, Sqlite, MySQL and Oracle
|
|
|
navtrack/navtrack
GPS tracking system based on .NET and React.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-preview.4 | 184 | 5/17/2026 |
| 11.0.0-preview.3 | 140 | 4/28/2026 |
| 11.0.0-preview.2 | 234 | 3/10/2026 |
| 11.0.0-preview.1 | 183 | 2/10/2026 |
| 10.0.2 | 57,792 | 5/27/2026 |
| 10.0.1 | 413,954 | 3/12/2026 |
| 10.0.0 | 708,424 | 11/22/2025 |
| 10.0.0-rc.2 | 12,158 | 10/16/2025 |
| 10.0.0-rc.1 | 5,077 | 9/10/2025 |
| 10.0.0-preview.7 | 1,395 | 8/17/2025 |
| 10.0.0-preview.5 | 4,052 | 6/11/2025 |
| 10.0.0-preview.3 | 1,356 | 4/12/2025 |
| 10.0.0-preview.2 | 605 | 3/24/2025 |
| 10.0.0-preview.1 | 429 | 3/1/2025 |
| 9.0.4 | 1,876,477 | 3/1/2025 |
| 9.0.3 | 360,582 | 1/17/2025 |
| 9.0.2 | 205,438 | 12/7/2024 |
| 9.0.1 | 133,723 | 11/19/2024 |
| 9.0.0 | 52,660 | 11/18/2024 |
| 8.0.11 | 914,647 | 11/18/2024 |