<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shiba-yan</author_name>
  <author_url>https://blog.hatena.ne.jp/shiba-yan/</author_url>
  <blog_title>しばやん雑記</blog_title>
  <blog_url>https://blog.shibayan.jp/</blog_url>
  <categories>
    <anon>ASP.NET</anon>
  </categories>
  <description>ASP.NET MVC で Repository パターンを使う方法を少し調べたのでまとめてみる。 モデル 基本的な方針としては Repository のインターフェースを作って、そのインターフェースを実装したクラスを作る。何でインターフェースを用意するのかは、テスタビリティ向上の為。テストプロジェクトではそのインターフェースを実装したモッククラスを用意すればテストを簡単に出来る。共通な部分は Generic 使ってさらにインターフェースとして切り出してやったほうがいいのかも。 public interface IRepository&lt;T&gt; { void Add(T entity); void…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.shibayan.jp%2Fentry%2F20090409%2F1239203944&quot; title=&quot;Repository for ASP.NET MVC - しばやん雑記&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>https://cdn.blog.st-hatena.com/images/theme/og-image-1500.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-04-09 00:19:04</published>
  <title>Repository for ASP.NET MVC</title>
  <type>rich</type>
  <url>https://blog.shibayan.jp/entry/20090409/1239203944</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
