DotNetCore.EntityFrameworkCore.GaussDB
8.0.0
See the version list below for details.
dotnet add package DotNetCore.EntityFrameworkCore.GaussDB --version 8.0.0
NuGet\Install-Package DotNetCore.EntityFrameworkCore.GaussDB -Version 8.0.0
<PackageReference Include="DotNetCore.EntityFrameworkCore.GaussDB" Version="8.0.0" />
paket add DotNetCore.EntityFrameworkCore.GaussDB --version 8.0.0
#r "nuget: DotNetCore.EntityFrameworkCore.GaussDB, 8.0.0"
// Install DotNetCore.EntityFrameworkCore.GaussDB as a Cake Addin #addin nuget:?package=DotNetCore.EntityFrameworkCore.GaussDB&version=8.0.0 // Install DotNetCore.EntityFrameworkCore.GaussDB as a Cake Tool #tool nuget:?package=DotNetCore.EntityFrameworkCore.GaussDB&version=8.0.0
GaussDB Entity Framework Core provider for PostgreSQL
DotNetCore.EntityFrameworkCore.GaussDB 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. It's built on top of DotNetCore.GaussDB.
The provider looks and feels just like any other Entity Framework Core provider. Here's a quick sample to get you started:
await using var ctx = new BlogContext();
await ctx.Database.EnsureDeletedAsync();
await ctx.Database.EnsureCreatedAsync();
// Insert a Blog
ctx.Blogs.Add(new() { Name = "FooBlog" });
await ctx.SaveChangesAsync();
// Query all blogs who's name starts with F
var fBlogs = await ctx.Blogs.Where(b => b.Name.StartsWith("F")).ToListAsync();
public class BlogContext : DbContext
{
public DbSet<Blog> Blogs { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder.UseGaussDB(@"host={host};port={port};username={username};password={password};database={database}");
}
public class Blog
{
public int Id { get; set; }
public string Name { get; set; }
}
Aside from providing general EF Core support for GaussDB, the provider also exposes some GaussDB-specific capabilities, allowing you to query JSON, array or range columns, as well as many other advanced features. For more information. For information about EF Core in general, see the EF Core website.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- DotNetCore.GaussDB (>= 8.0.1)
- Microsoft.EntityFrameworkCore (>= 8.0.0)
- Microsoft.EntityFrameworkCore.Abstractions (>= 8.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DotNetCore.EntityFrameworkCore.GaussDB:
Package | Downloads |
---|---|
EaCloud.EntityFrameworkCore.GaussDB
EaCloud GaussDB(华为) 数据库组件,封装基于 DotNetCore.EntityFrameworkCore.GaussDB 的数据访问功能的实现。 |
GitHub repositories
This package is not used by any popular GitHub repositories.