Urgent.News

What's breaking now, across thousands of outlets.

Tech

Polecat on SQL Server 2025: Production Spike Migration

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…

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.

Key findings included:

1. 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.

2. 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.

3. 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.

4. 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.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Opening hours component in React with time zones

The first "Open now" badge I shipped for a client lied. The salon was in Zurich, the site was deployed on servers in the US, and I was testing from my laptop at home.

  • Opening hours component in React handles time zones for businesses
  • getZonedNow function converts Date object to specified time zone
  • Component uses weekly map to display open/close status and split shifts

Replacing Shopify Won’t Fix a Storefront That Doesn’t Match Your Brand

A gaming studio kept Shopify and added Strapi and Nuxt. Here is how I separate commerce limits from frontend limits before any migration.

  • Poor storefront doesn't indicate a problem with Shopify's commerce platform.
  • The real issue may lie in the frontend or content layer, not the backend.
  • Replacing Shopify unnecessary if the backend handles merchandise well.

More from Tuesday 3 November →