Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 799 Bytes

File metadata and controls

18 lines (14 loc) · 799 Bytes

Mini Include + CancellationToken Sample (SQLite, .NET 8)

This sample shows a tiny ORM with simple POCOs, a lightweight Include for eager loading, and full CancellationToken propagation.

How to run

cd Demo.App
dotnet run

Press Ctrl+C to cancel while running; the app will stop gracefully.

What it demonstrates

  • Simple POCOs: Blog, Post with [Table], [Key], [ForeignKey], [InverseProperty].
  • Include for both collections and references (extra queries per entity).
  • Cancellation support across: opening connection, executing commands, include loading, seeding, and saving.

Switch to SQL Server

Replace Microsoft.Data.Sqlite with Microsoft.Data.SqlClient and change identity retrieval in SqlBuilder.Insert to SELECT SCOPE_IDENTITY();.