<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>dotnetmemo</author_name>
  <author_url>https://blog.hatena.ne.jp/dotnetmemo/</author_url>
  <blog_title>開発思考実験日記</blog_title>
  <blog_url>https://dotnetmemo.hatenadiary.org/</blog_url>
  <categories>
    <anon>DDD</anon>
  </categories>
  <description>前回まででドメインを利用するコードをかなりリッチにできました。ただ、サブルーチン的な構造化を機械的に行ってきたため結合度が低くく凝集度が高いコードにはなっていません。たとえば在庫判定処理。引数に予約を含めているのですがこれはかなり座りが悪くなっています。もともと予約が別の処理で利用していたためですが、共通化した処理でこのような前提はリーズナブルではありません。 public static bool HasStock(this TitleStock stock, Reserve reserve) { if (stock.ItemCount - stock.RentalCount == 0) re…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdotnetmemo.hatenadiary.org%2Fentry%2F20090308%2F1236512871&quot; title=&quot;ドメインモデル貧血症のコードをリッチ化してみる？その４ - 開発思考実験日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-03-08 20:47:51</published>
  <title>ドメインモデル貧血症のコードをリッチ化してみる？その４</title>
  <type>rich</type>
  <url>https://dotnetmemo.hatenadiary.org/entry/20090308/1236512871</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
