{"id":18542071,"url":"https://github.com/dorssel/dotnet-ef-sqlite-timestamp","last_synced_at":"2025-10-29T00:31:17.427Z","repository":{"id":225052949,"uuid":"764836528","full_name":"dorssel/dotnet-ef-sqlite-timestamp","owner":"dorssel","description":"Extension for Entity Framework (EF) Core 8.0 that adds support for SQLite row versioning ([Timestamp] attribute).","archived":false,"fork":false,"pushed_at":"2024-04-11T23:32:24.000Z","size":70,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-01T18:01:59.439Z","etag":null,"topics":["dotnet","entity-framework-core","sqlite"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dorssel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-28T19:53:33.000Z","updated_at":"2024-05-22T11:35:53.404Z","dependencies_parsed_at":"2024-02-29T02:31:39.566Z","dependency_job_id":"3dea442b-7574-47c7-8a1b-31527f4bc999","html_url":"https://github.com/dorssel/dotnet-ef-sqlite-timestamp","commit_stats":null,"previous_names":["dorssel/dotnet-ef-sqlite-timestamp"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorssel%2Fdotnet-ef-sqlite-timestamp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorssel%2Fdotnet-ef-sqlite-timestamp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorssel%2Fdotnet-ef-sqlite-timestamp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dorssel%2Fdotnet-ef-sqlite-timestamp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dorssel","download_url":"https://codeload.github.com/dorssel/dotnet-ef-sqlite-timestamp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238747874,"owners_count":19523849,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","entity-framework-core","sqlite"],"created_at":"2024-11-06T20:07:12.656Z","updated_at":"2025-10-29T00:31:17.415Z","avatar_url":"https://github.com/dorssel.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: 2024 Frans van Dorsselaer\n\nSPDX-License-Identifier: MIT\n--\u003e\n\n# dotnet-ef-sqlite-timestamp\n\n[![Build](https://github.com/dorssel/dotnet-ef-sqlite-timestamp/actions/workflows/dotnet.yml/badge.svg?branch=main)](https://github.com/dorssel/dotnet-ef-sqlite-timestamp/actions?query=workflow%3ABuild+branch%3Amain)\n[![CodeQL](https://github.com/dorssel/dotnet-ef-sqlite-timestamp/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/dorssel/dotnet-ef-sqlite-timestamp/actions?query=workflow%3ACodeQL+branch%3Amain)\n[![MegaLinter](https://github.com/dorssel/dotnet-ef-sqlite-timestamp/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/dorssel/dotnet-ef-sqlite-timestamp/actions?query=workflow%3ALint+branch%3Amain)\n[![Codecov](https://codecov.io/gh/dorssel/dotnet-ef-sqlite-timestamp/branch/main/graph/badge.svg?token=zsbTiXoisQ)](https://codecov.io/gh/dorssel/dotnet-ef-sqlite-timestamp)\n[![REUSE status](https://api.reuse.software/badge/github.com/dorssel/dotnet-ef-sqlite-timestamp)](https://api.reuse.software/info/github.com/dorssel/dotnet-ef-sqlite-timestamp)\n[![NuGet](https://img.shields.io/nuget/v/Dorssel.EntityFrameworkCore.Sqlite.Timestamp?logo=nuget)](https://www.nuget.org/packages/Dorssel.EntityFrameworkCore.Sqlite.Timestamp)\n\nExtension for Entity Framework (EF) Core 8.0 (or higher) that adds support for SQLite row versioning (`[Timestamp]` attribute).\n\nThe implementation is for AnyCPU, and works on all platforms.\n\n## Usage\n\nAdd a package reference to your project for\n[`Dorssel.EntityFrameworkCore.Sqlite.Timestamp`](https://www.nuget.org/packages/Dorssel.EntityFrameworkCore.Sqlite.Timestamp),\nnext to an explicit reference to the required version of SQLite.\n\nFor EF Core 8:\n\n```diff\n   \u003cPackageReference Include=\"Microsoft.EntityFrameworkCore.Sqlite\" Version=\"8.*\" /\u003e\n+  \u003cPackageReference Include=\"Dorssel.EntityFrameworkCore.Sqlite.Timestamp\" Version=\"*\" /\u003e\n```\n\nFor EF Core 9:\n\n```diff\n   \u003cPackageReference Include=\"Microsoft.EntityFrameworkCore.Sqlite\" Version=\"9.*\" /\u003e\n+  \u003cPackageReference Include=\"Dorssel.EntityFrameworkCore.Sqlite.Timestamp\" Version=\"*\" /\u003e\n```\n\n\u003e [!NOTE]\n\u003e It is not recommended to solely rely on the transitive dependency on `Microsoft.EntityFrameworkCore.Sqlite`,\n\u003e as that would use the version at the time `Dorssel.EntityFrameworkCore.Sqlite.Timestamp` was built\n\u003e instead of the latest one. Therefore, always add an explicit package reference for `Microsoft.EntityFrameworkCore.Sqlite`\n\u003e in your project as well.\n\nIn your `DbContext` derived class modify the following:\n\n```diff\n+  using Dorssel.EntityFrameworkCore;\n\n   protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)\n   {\n     optionsBuilder\n       .UseSqlite($\"Data Source={DbPath}\")\n+      .UseSqliteTimestamp();\n   }\n```\n\nThis is all you need to support row versioning with SQLite, including support for migrations.\n\nSee [Native database-generated concurrency tokens](https://learn.microsoft.com/en-us/ef/core/saving/concurrency?tabs=data-annotations#native-database-generated-concurrency-tokens);\nexcept now you can ignore the part that says it isn't supported with SQLite!\n\n### Example\n\nSee the Example project for a demonstration using .NET 9 \u0026 EF Core 9.\n\n## NuGet package\n\nThe released [NuGet package](https://www.nuget.org/packages/Dorssel.EntityFrameworkCore.Sqlite.Timestamp)\nand the .NET assemblies contained therein have the following properties:\n\n- [Strong Naming](https://learn.microsoft.com/en-us/dotnet/standard/library-guidance/strong-naming)\n- [SourceLink](https://learn.microsoft.com/en-us/dotnet/standard/library-guidance/sourcelink)\n- [IntelliSense](https://learn.microsoft.com/en-us/visualstudio/ide/using-intellisense)\n- [Authenticode](https://learn.microsoft.com/en-us/windows/win32/seccrypto/time-stamping-authenticode-signatures#a-brief-introduction-to-authenticode)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdorssel%2Fdotnet-ef-sqlite-timestamp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdorssel%2Fdotnet-ef-sqlite-timestamp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdorssel%2Fdotnet-ef-sqlite-timestamp/lists"}