Toamaisutaa.EntityFrameworkCore 0.5.0

dotnet add package Toamaisutaa.EntityFrameworkCore --version 0.5.0
                    
NuGet\Install-Package Toamaisutaa.EntityFrameworkCore -Version 0.5.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Toamaisutaa.EntityFrameworkCore" Version="0.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Toamaisutaa.EntityFrameworkCore" Version="0.5.0" />
                    
Directory.Packages.props
<PackageReference Include="Toamaisutaa.EntityFrameworkCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Toamaisutaa.EntityFrameworkCore --version 0.5.0
                    
#r "nuget: Toamaisutaa.EntityFrameworkCore, 0.5.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Toamaisutaa.EntityFrameworkCore@0.5.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Toamaisutaa.EntityFrameworkCore&version=0.5.0
                    
Install as a Cake Addin
#tool nuget:?package=Toamaisutaa.EntityFrameworkCore&version=0.5.0
                    
Install as a Cake Tool

Toamaisutaa.EntityFrameworkCore

Entity Framework Core storage for Toamaisutaa: users, external logins, password credentials, refresh tokens, reset tokens, and two-factor enrolments.

There are two ways to use it, and they differ only in whose DbContext holds the tables.

Its own context, so the tables live apart from yours:

builder.Services.AddToamaisutaaDbContext(db => db.UseNpgsql(
    connectionString,
    npgsql => npgsql.MigrationsAssembly("Toamaisutaa.EntityFrameworkCore.Migrations.Postgres")));

Your context, so they do not:

protected override void OnModelCreating(ModelBuilder modelBuilder) =>
    modelBuilder.ApplyToamaisutaaConfiguration();
builder.Services.AddToamaisutaaEntityFrameworkStores<YourDbContext>();

The shipped migrations only cover ToamaisutaaDbContext, so with your own context you generate the migration in your own project. Every entity configuration is public, and calling ToTable after one renames its table.

Migrations

Install one alongside this package - they are provider-specific and cannot share an assembly:

Provider Package
PostgreSQL Toamaisutaa.EntityFrameworkCore.Migrations.Postgres
SQLite Toamaisutaa.EntityFrameworkCore.Migrations.Sqlite
SQL Server Toamaisutaa.EntityFrameworkCore.Migrations.SqlServer
MySQL Toamaisutaa.EntityFrameworkCore.Migrations.MySql

One thing worth knowing

Every timestamp is stored as Unix milliseconds in a long, not as a native date type. SQLite cannot translate a range query on a DateTimeOffset, and the cleanup sweep is exactly that query, so the column type is chosen by the provider that cannot do it rather than the ones that can. The conversion is transparent - the entities expose DateTimeOffset - but it is visible if you query the tables by hand.

Documentation

Storage and migrations - docs.toamaisutaa.pianonic.ch

Licensed under PolyForm Noncommercial 1.0.0 - free for noncommercial use; commercial use needs a separate licence.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Toamaisutaa.EntityFrameworkCore:

Package Downloads
Toamaisutaa.EntityFrameworkCore.Migrations.Postgres

PostgreSQL migrations for the Toamaisutaa schema. Migrations are provider-specific and cannot share an assembly, so each provider ships its own.

Toamaisutaa.EntityFrameworkCore.Migrations.Sqlite

SQLite migrations for the Toamaisutaa schema. Migrations are provider-specific and cannot share an assembly, so each provider ships its own.

Toamaisutaa.EntityFrameworkCore.Migrations.MySql

MySQL migrations for the Toamaisutaa schema. Migrations are provider-specific and cannot share an assembly, so each provider ships its own.

Toamaisutaa.EntityFrameworkCore.Migrations.SqlServer

SQL Server migrations for the Toamaisutaa schema. Migrations are provider-specific and cannot share an assembly, so each provider ships its own.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.5.0 44 8/12/2026
0.4.0 47 8/12/2026
0.3.0 48 8/11/2026
0.2.0 47 8/11/2026
0.1.0 46 8/11/2026