Advanced SQL doesn’t have to mean raw SQL strings 🧵
See how OrmLite brings Recursive CTEs, Window Functions, Top N Per Group & Temporal Tables to typed C#
Your query is fast. What about everything around it?
New #OrmLite video:
• Batch 1,000 inserts up to 8.5× faster—same code
• Compile queries: generate SQL once
• SeekAfter: page 1,000 in 0.23 ms vs 33.95 ms
Benchmarks, SQL, and trade-offs 👇
📚 Ready to try it? The docs cover the APIs, C# examples and database support:
🔒 Row locking & SKIP LOCKED
docs.servicestack.net/ormlit…
↩️ Returning updated & deleted rows
docs.servicestack.net/ormlit…
💸 Two requests deposit $10. Both succeed. One deposit disappears.
Your C# code looks correct. Your database balance isn’t. 😬
🎬 New OrmLite video: prevent lost updates with row locks, plus SKIP LOCKED queues, RETURNING & UPSERTS.
Try it in your own .NET App 👇
The OrmLite Schema Diff docs cover comparing models with tables, generating migrations for review, and logging schema differences at startup.
docs.servicestack.net/ormlit…
Sql.Fmt also sends enums, numbers and dates as typed params, expands lists into IN lists, and works with every raw SQL API, sync or async.
📘 Sql.Fmt: docs.servicestack.net/ormlit…
📘 OrderBySafe: docs.servicestack.net/ormlit…
📘 SQL injection: docs.servicestack.net/ormlit…
OrmLite gives you a huge surface of typed APIs with LINQ expressions. But when you need custom SQL, you don't have to give up safety.
Sql.Fmt lets you write C# interpolated strings, and every {value} is sent as a db param:
Sql.Fmt($"Author = {author}") → WHERE Author = @p0
Follow-up docs for the video 👇
📖 Multitenancy: How to confine a connection to a tenant docs.servicestack.net/ormlit…
🏗️ Guide: How the Next SaaS template applies it, with the code and tests for each rule docs.servicestack.net/ormlit…




