Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

AltStyle によって変換されたページ (->オリジナル) /