SShortSingh.
Back to feed

EF Core vs Marten and Polecat: Choosing the Right .NET Data Tool

0
·3 views

In .NET development, EF Core remains the default ORM for genuinely relational data — such as tables queried independently or schemas shared across services — but it adds complexity when used to model aggregates like orders with nested items and addresses. Tools like Marten (for PostgreSQL) and Polecat (for SQL Server) store entire domain objects as JSON documents in the same database already in use, eliminating the need for a separate document database. The common pain points of EF Core overuse include growing Include chains, AsSplitQuery workarounds, and frequent migrations for unsettled schemas — symptoms that suggest a document model may be more appropriate. With a document session, an aggregate is loaded by ID, modified, and saved in a single commit, avoiding the mapping overhead EF Core requires to reassemble a unified domain object from relational tables. The core guidance is to use EF Core where data is truly relational and reach for Marten or Polecat where the domain naturally treats an object as one cohesive unit.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer Seeks Beta Testers for No-Code HTML-to-Gutenberg WordPress Plugin

A developer has built a WordPress plugin called Magic Blocks that converts any HTML element into a configurable Gutenberg block without requiring coding. The tool works alongside a companion browser extension available for Firefox and Chrome. Users activate the extension, click any HTML element on a webpage, and the plugin automatically calculates CSS and installs a fully functional Gutenberg block on their WordPress site. Text, links, and images — including background images — are turned into editable parameters that can be updated directly from The Loop. The developer plans to release Magic Blocks as free and open-source software and is currently seeking beta testers.

0
ProgrammingDEV Community ·

MergeKit Cloud Brings AI Model Merging Online, Seeks Open-Source Contributors

MergeKit, a tool that enables developers to merge large language models without costly retraining, is expanding into a cloud-based platform called MergeKit Cloud. The project aims to make model merging accessible beyond local machine constraints by supporting cloud-bucket storage layers with optimized tensor chunking and lazy weight loading. The team is also working to integrate automated benchmarking suites such as LMSYS and AlpacaEval directly into the merging workflow. Additionally, a visual recipe block builder is being developed to allow non-technical enterprise users to participate in model creation. The project is actively inviting open-source contributors across MLOps, evaluation, and frontend development areas.

0
ProgrammingDEV Community ·

Why Embracing 'Unknown' States Leads to Better Code and Clearer Thinking

A software developer draws parallels between system design and personal psychology, arguing that tolerating uncertainty is more honest and effective than forcing premature conclusions. In a payment settlement engine they built, an explicit UNKNOWN state handles ambiguous outcomes — such as gateway failures or database deadlocks — rather than retrying until a false yes or no is produced. The same logic applies to concurrent transaction handling, where allowing two requests to proceed and letting a database constraint resolve the conflict outperforms upfront locking that causes deadlocks. The developer extends this principle to self-reflection, treating beliefs about their own anxiety as hypotheses to be tested rather than settled truths. The core argument is that a slow, correct answer is more valuable than a fast, manufactured certainty — in both code and life.

0
ProgrammingDEV Community ·

Banco do Brasil Billing API: Key Technical Challenges and Limitations

Banco do Brasil's Billing API enables businesses to automate the issuance, querying, and management of bank payment slips (boletos), but its implementation comes with notable technical and operational hurdles. Credential management is a critical concern, as regenerating access keys can invalidate existing ones and disrupt live systems. High-volume applications must carefully manage request frequency and implement processing queues to stay within API usage limits. Financial reconciliation remains a manual responsibility even after automation, requiring systems to handle duplicate payments, delayed updates, and a 60-day query restriction on settled invoices. Experts recommend separating boleto registration, status queries, and payment confirmation into distinct architectural layers, alongside robust audit logging and contingency procedures.