<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/anemic-vs-rich-models-in-asp-net-core-t2dzp36bt" -->

---
title: Anemic vs Rich Models in ASP.NET Core | daily.dev
description: A comparison of anemic and rich domain models in ASP.NET Core, explaining that anemic models act as plain data containers with business logic in services,...
canonical: https://daily.dev/posts/anemic-vs-rich-models-in-asp-net-core-t2dzp36bt
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Anemic vs Rich Models in ASP.NET Core | daily.dev
og:description: A comparison of anemic and rich domain models in ASP.NET Core, explaining that anemic models act as plain data containers with business logic in services,...
og:url: https://daily.dev/posts/anemic-vs-rich-models-in-asp-net-core-t2dzp36bt
og:image: https://api.daily.dev/og/posts/T2DZp36Bt.png
og:image:alt: Anemic vs Rich Models in ASP.NET Core
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Anemic vs Rich Models in ASP.NET Core

**[NikolaTech](https://daily.dev/sources/nikolatech)** · 5 min read · 0 upvotes · 0 comments

## Summary

A comparison of anemic and rich domain models in ASP.NET Core, explaining that anemic models act as plain data containers with business logic in services, while rich models encapsulate both data and behavior following DDD principles. It argues anemic models suit simple CRUD apps but become problematic as domain complexity grows, leading to scattered and duplicated business rules. Concrete C# examples show refactoring an Order entity and a cancel-order command handler from anemic to rich style, along with practical tips for migrating incrementally.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nikolatech.net/blogs/anemic-vs-rich-models-aspnet-core>

## Questions this post answers

### What is the difference between an anemic domain model and a rich domain model in C#?

An anemic domain model has entities that only store data via public properties, with all business logic placed in separate service classes. A rich domain model encapsulates both data and behavior inside the entity itself, using private setters and methods like Cancel() or AddItem() to enforce business rules and maintain consistency, following domain-driven design principles.

_daily.dev surfaces practical DDD patterns for developers deciding how to structure their domain layer._

### When should I refactor an anemic domain model into a rich one in ASP.NET Core?

Refactor when business rules start repeating across services, entity invariants become hard to maintain, or bugs appear from inconsistent rule enforcement. Starting with an anemic model is fine for simple CRUD or customer-facing APIs, but as the domain grows more central, moving logic into entity methods (like replacing public setters with private set and exposing behavior methods) keeps rule changes localized to one place.

_developers tracking when to evolve their domain layer can find practical refactoring guidance on daily.dev._

## Similar posts on daily.dev

- [Rich Domains: How to Use DDD for More Sustainable Systems](https://daily.dev/posts/rich-domains-how-to-use-ddd-for-more-sustainable-systems-bufcaincm) · Telerik · 2 upvotes · 0 comments
- [Rails to ASP.NET Core: A Developer's Map](https://daily.dev/posts/rails-to-asp-net-core-a-developer-s-map-bwpvb7n8j) · Khalid Abuhakmeh · 0 upvotes · 0 comments
- [Creating a Production-Ready CRUD Application in ASP.NET Core](https://daily.dev/posts/creating-a-production-ready-crud-application-in-asp-net-core-1mfpkrepl) · Telerik · 0 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#.net](https://daily.dev/tags/.net), [#c#](https://daily.dev/tags/c#), [#aspnet](https://daily.dev/tags/aspnet), [#domain-driven-design](https://daily.dev/tags/domain-driven-design)

[View this post on daily.dev](https://daily.dev/posts/anemic-vs-rich-models-in-asp-net-core-t2dzp36bt)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Anemic vs Rich Models in ASP.NET Core","url":"https://daily.dev/posts/anemic-vs-rich-models-in-asp-net-core-t2dzp36bt","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/anemic-vs-rich-models-in-asp-net-core-t2dzp36bt"},"datePublished":"2026-10-04T13:05:47.933Z","dateModified":"2026-10-04T13:11:28.212Z","description":"A comparison of anemic and rich domain models in ASP.NET Core, explaining that anemic models act as plain data containers with business logic in services,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a10c6be56e60f751ee2413b71b8dba87?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a10c6be56e60f751ee2413b71b8dba87?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"NikolaTech","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"NikolaTech","logo":"https://media.daily.dev/image/upload/s--1h2fO6FL--/f_auto,q_auto/v1791119050/logos/nikolatech?_a=BAMAMicg0","url":"https://daily.dev/sources/nikolatech"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/anemic-vs-rich-models-in-asp-net-core-t2dzp36bt","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,.net,c#,aspnet,domain-driven-design","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"NikolaTech","item":"https://daily.dev/sources/nikolatech"},{"@type":"ListItem","position":3,"name":"Anemic vs Rich Models in ASP.NET Core"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/anemic-vs-rich-models-in-asp-net-core-t2dzp36bt#faq","mainEntity":[{"@type":"Question","name":"What is the difference between an anemic domain model and a rich domain model in C#?","acceptedAnswer":{"@type":"Answer","text":"An anemic domain model has entities that only store data via public properties, with all business logic placed in separate service classes. A rich domain model encapsulates both data and behavior inside the entity itself, using private setters and methods like Cancel() or AddItem() to enforce business rules and maintain consistency, following domain-driven design principles. daily.dev surfaces practical DDD patterns for developers deciding how to structure their domain layer."}},{"@type":"Question","name":"When should I refactor an anemic domain model into a rich one in ASP.NET Core?","acceptedAnswer":{"@type":"Answer","text":"Refactor when business rules start repeating across services, entity invariants become hard to maintain, or bugs appear from inconsistent rule enforcement. Starting with an anemic model is fine for simple CRUD or customer-facing APIs, but as the domain grows more central, moving logic into entity methods (like replacing public setters with private set and exposing behavior methods) keeps rule changes localized to one place. developers tracking when to evolve their domain layer can find practical refactoring guidance on daily.dev."}}]}
```

