Dorssel.EntityFrameworkCore.Sqlite.Timestamp 8.0.2

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

dotnet-ef-sqlite-timestamp

Build CodeQL MegaLinter codecov REUSE status NuGet

Extension for Entity Framework (EF) Core 8.0 that adds support for SQLite row versioning ([Timestamp] attribute).

The implementation is for AnyCPU, and works on all platforms.

Usage

Add a package reference to your project for Dorssel.EntityFrameworkCore.Sqlite.Timestamp.

In your DbContext derived class modify the following:

+using Dorssel.EntityFrameworkCore;

   protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
   {
     optionsBuilder
       .UseSqlite($"Data Source={DbPath}")
+      .UseSqliteTimestamp();
   }

This is all you need to support row versioning with SQLite, including support for migrations.

See Native database-generated concurrency tokens; except now you can ignore the part that says it isn't supported with SQLite!

The released binary NuGet packages and the .NET assemblies contained therein have the following properties:

Product 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.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
8.0.2 13,138 3/20/2024
8.0.1 144 3/10/2024
8.0.0 162 3/1/2024