<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>bookreadkun</author_name>
  <author_url>https://blog.hatena.ne.jp/bookreadkun/</author_url>
  <blog_title>おーみんブログ</blog_title>
  <blog_url>https://oooomincrypto.hatenadiary.jp/</blog_url>
  <categories>
    <anon>C#</anon>
  </categories>
  <description>はじめに ASP.NET Coreでモデルを定義する場合はEntityクラスにテーブル定義を書き、DbContextクラスでデータベース定義を行います。 今回はそれらの定義に加えてEFCoreで特定のカラムにインデックスを付与する方法を記載します。 HasIndexメソッド EFCoreを用いてインデックスを付与する場合はこちらのHasIndexメソッドを用います。 docs.microsoft.com サンプルコード HasIndexメソッドを使う際はDbContextクラスのOnModelCreatingメソッドをオーバーライドし、その中で定義をします。 下記にサンプルコードを記載します。…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Foooomincrypto.hatenadiary.jp%2Fentry%2F2022%2F04%2F24%2F200855&quot; title=&quot;EFCoreのHasIndexメソッドを用いてDBのカラムにインデックスを作成する！ - おーみんブログ&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://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/538249/a50cc011-28e3-a1ac-31f0-0cf4e1582df7.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-04-24 20:08:55</published>
  <title>EFCoreのHasIndexメソッドを用いてDBのカラムにインデックスを作成する！</title>
  <type>rich</type>
  <url>https://oooomincrypto.hatenadiary.jp/entry/2022/04/24/200855</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
