Skip to content

tsoniclang/efcore-npgsql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@tsonic/efcore-npgsql

TypeScript declarations and CLR binding metadata for the EF Core PostgreSQL provider (Npgsql.EntityFrameworkCore.PostgreSQL) on .NET 10.

This is a generated binding package. It exposes provider APIs to TypeScript and Tsonic while your workspace references the real NuGet assemblies.

Install

npm install @tsonic/efcore-npgsql @tsonic/efcore @tsonic/dotnet @tsonic/core

Use with Tsonic

tsonic add nuget Npgsql.EntityFrameworkCore.PostgreSQL <version> @tsonic/efcore-npgsql
tsonic restore

Imports

Provider extensions are exported from the generated Microsoft.EntityFrameworkCore namespace facade:

import { NpgsqlDbContextOptionsBuilderExtensions } from "@tsonic/efcore-npgsql/Microsoft.EntityFrameworkCore.js";

Use EF Core base types from @tsonic/efcore:

import { DbContextOptionsBuilder } from "@tsonic/efcore/Microsoft.EntityFrameworkCore.js";

UseNpgsql example

import { DbContextOptionsBuilder } from "@tsonic/efcore/Microsoft.EntityFrameworkCore.js";
import { NpgsqlDbContextOptionsBuilderExtensions } from "@tsonic/efcore-npgsql/Microsoft.EntityFrameworkCore.js";

const builder = new DbContextOptionsBuilder();
NpgsqlDbContextOptionsBuilderExtensions.UseNpgsql(builder, "Host=localhost;Database=app;Username=postgres;Password=postgres");
const options = builder.Options;

Package shape

The package contains generated namespace facades, ESM stubs, internal declarations, extension buckets, and bindings.json compiler metadata. It uses @tsonic/efcore, @tsonic/microsoft-extensions, @tsonic/dotnet, and @tsonic/core as peer packages for shared CLR types.

Generated CLR object slots use TypeScript unknown; value-type constraints use NonNullable<unknown>. Provider code that receives a broad CLR value should narrow it through a proven API before member access.

Versioning

This repo is versioned by .NET major:

  • .NET 10 → npm: @tsonic/efcore-npgsql@10.x

Development

Regenerate from sibling checkouts:

npm install
./__build/scripts/generate.sh

The generation script requires .NET 10, ../tsbindgen, ../dotnet, ../microsoft-extensions, and ../efcore.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors