Creomobile.Data.EFCore.Timestamps 0.3.0

dotnet add package Creomobile.Data.EFCore.Timestamps --version 0.3.0
                    
NuGet\Install-Package Creomobile.Data.EFCore.Timestamps -Version 0.3.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="Creomobile.Data.EFCore.Timestamps" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Creomobile.Data.EFCore.Timestamps" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Creomobile.Data.EFCore.Timestamps" />
                    
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 Creomobile.Data.EFCore.Timestamps --version 0.3.0
                    
#r "nuget: Creomobile.Data.EFCore.Timestamps, 0.3.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 Creomobile.Data.EFCore.Timestamps@0.3.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=Creomobile.Data.EFCore.Timestamps&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Creomobile.Data.EFCore.Timestamps&version=0.3.0
                    
Install as a Cake Tool

Creomobile.Data.EFCore.Timestamps

The EF Core side of the timestamp contracts in Creomobile.Data.Abstractions: CreatedAt and UpdatedAt are maintained for you, and deleting an entity that carries DeletedAt becomes a soft delete.

Usage

services.AddDbContext<AppDbContext>(options => options
    .UseNpgsql(connectionString)
    .UseTimestamps());

public sealed class Customer : EntityBase<Guid>, ITimestamps
{
    public string Name { get; set; } = null!;
}

EntityBase<TId> and the timestamp interfaces come from Creomobile.Data.Abstractions, installed automatically as a dependency.

UseTimestamps(TimeProvider? timeProvider = null)

Maintains the timestamp interfaces from Creomobile.Data.Abstractions — ICreatedAt, IUpdatedAt, IDeletedAt, each of which works independently, with ITimestamps aggregating all three:

  • Insert — CreatedAt and UpdatedAt receive the same UTC instant.
  • Update — UpdatedAt is refreshed; CreatedAt is protected from accidental overwrites.
  • Delete of an IDeletedAt entity becomes a soft delete: the row is kept with DeletedAt set, owned entities are retained; setting DeletedAt back to null restores the entity. Regular (non-owned) dependents still follow the normal delete cascade — implement IDeletedAt on them or adjust DeleteBehavior if they must survive the parent's soft delete.
  • A named query filter ("SoftDelete") hides soft-deleted entities from queries; bypass it per query with IgnoreQueryFilters() or selectively with IgnoreQueryFilters([SoftDeleteQueryFilterConvention.FilterKey]).
  • All entities saved together share one instant; pass a TimeProvider for deterministic tests.

Repeated calls are no-ops: the first call wins, including its TimeProvider.

See the XML documentation of UseTimestamps and SoftDeleteQueryFilterConvention for exact semantics and known limitations.

Requirements

  • .NET 10+
  • EF Core 10
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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0 47 10/3/2026
0.2.7 117 9/19/2026
0.2.5 143 8/16/2026
0.2.3 121 8/15/2026
0.2.2 113 8/15/2026
0.2.1 109 8/15/2026
0.2.0 131 8/9/2026