Skip to content

stevsharp/MicroOrm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages