{
  "id": 17957512,
  "title": "Polecat on SQL Server 2025: Production Spike Migration",
  "url": "https://urgent.news/2026/11/03/polecat-on-sql-server-2025-production-spike-migration",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-03T11:52:48.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ondej_podhorny/polecat-on-sql-server-2025-production-spike-migration-1lb"
  },
  "original_language": "en",
  "account": "For .NET teams utilizing Microsoft SQL Server, Polecat on SQL Server 2025 represents a significant advancement over document databases and Wolverine messaging. Migrating a production spike revealed critical insights into handling enterprise environments where SQL Server is a requirement. While PostgreSQL's Marten remains the gold standard for .NET document databases and event sourcing, SQL Server 2025 now enables high-performance document store capabilities with Polecat. This migration highlighted distinct architectural refinements and runtime constraints between the two engines.\n\nKey findings included:\n\n1. Strict Asynchrony and DI Scope Trap: Polecat does not support synchronous LINQ enumeration; ToListAsync() must be used instead. Implementing IQuerySession with IAsyncDisposable is mandatory, as synchronous Scope creation fails on Dispose.\n\n2. Narrower LINQ Expression Parser: Polecat's WhereClauseParser is stricter, requiring predicates to directly compare a concrete document member against a constant or value. Generic filter extensions using interface-constrained filters will throw BadLinqExpressionException. Refactoring these predicates to compare concrete document members will resolve this issue.\n\n3. Batch Querying and IBatchedQueryable: Both libraries support session.CreateBatchQuery() for combining queries into a single database roundtrip. However, Polecat's IBatchedQueryable does not inherit from IQueryable and must be used with standalone async queries for paged or projected queries requiring OrderBy, Skip, Take, or Select.\n\n4. API Surface and Architecture Differences: Polecat has modularized its namespace design, separating Async LINQ operators and batching types into distinct namespaces. Method signatures have been updated to include CancellationToken where applicable.",
  "summary": "For .NET teams tied to Microsoft SQL Server who want the developer velocity of document databases and Wolverine messaging, Polecat on SQL Server 2025 is a massive leap forward. Here is what we learned from migrating a production spike. If your team is committed to PostgreSQL, Marten remains the gold standard of .NET document databases and event sourcing. But what about enterprise environments…",
  "key_points": [
    "Polecat on SQL Server 2025 enables high-performance document store capabilities.",
    "Strict asynchrony required; ToListAsync() must replace synchronous LINQ enumeration.",
    "IBatchedQueryable differs from IQueryable, used with standalone async queries."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}