次の方法で共有


IMutableModel.AddEntityType メソッド

定義

オーバーロード

AddEntityType(String)

既定の型のエンティティ型をモデルに追加します。

AddEntityType(String, Type)

共有型エンティティ型をモデルに追加します。

AddEntityType(Type)

エンティティ型をモデルに追加します。

AddEntityType(String, String, IMutableEntityType)

モデルへのナビゲーションを定義する所有エンティティ型を追加します。

AddEntityType(Type, String, IMutableEntityType)

モデルへのナビゲーションを定義する所有エンティティ型を追加します。

AddEntityType(String)

既定の型のエンティティ型をモデルに追加します。

public Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType AddEntityType (string name);
abstract member AddEntityType : string -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
Public Function AddEntityType (name As String) As IMutableEntityType

パラメーター

name
String

追加するエンティティの名前。

戻り値

新しいエンティティ型。

注釈

シャドウ エンティティは、現在、 と共 DbContextに実行時に使用されるモデルではサポートされていません。 そのため、シャドウ状態エンティティの種類は、移行モデルのスナップショットなどにのみ存在します。

適用対象

AddEntityType(String, Type)

共有型エンティティ型をモデルに追加します。

public Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType AddEntityType (string name, Type type);
abstract member AddEntityType : string * Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
Public Function AddEntityType (name As String, type As Type) As IMutableEntityType

パラメーター

name
String

追加するエンティティの名前。

type
Type

エンティティ型のインスタンスを表すために使用される CLR クラス。

戻り値

新しいエンティティ型。

注釈

共有型エンティティ型は、CLR 型をモデル内の他の型と共有できるが、一意の名前を持ち、常に名前で識別されるエンティティ型です。

適用対象

AddEntityType(Type)

エンティティ型をモデルに追加します。

public Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType AddEntityType (Type clrType);
public Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType AddEntityType (Type type);
abstract member AddEntityType : Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
abstract member AddEntityType : Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
Public Function AddEntityType (clrType As Type) As IMutableEntityType
Public Function AddEntityType (type As Type) As IMutableEntityType

パラメーター

clrTypetype
Type

エンティティ型のインスタンスを表すために使用される CLR クラス。

戻り値

新しいエンティティ型。

適用対象

AddEntityType(String, String, IMutableEntityType)

モデルへのナビゲーションを定義する所有エンティティ型を追加します。

public Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType AddEntityType (string name, string definingNavigationName, Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType definingEntityType);
abstract member AddEntityType : string * string * Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
Public Function AddEntityType (name As String, definingNavigationName As String, definingEntityType As IMutableEntityType) As IMutableEntityType

パラメーター

name
String

追加するエンティティ型の名前。

definingNavigationName
String

ナビゲーションの定義。

definingEntityType
IMutableEntityType

定義するエンティティ型。

戻り値

新しいエンティティ型。

適用対象

AddEntityType(Type, String, IMutableEntityType)

モデルへのナビゲーションを定義する所有エンティティ型を追加します。

public Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType AddEntityType (Type clrType, string definingNavigationName, Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType definingEntityType);
public Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType AddEntityType (Type type, string definingNavigationName, Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType definingEntityType);
abstract member AddEntityType : Type * string * Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
abstract member AddEntityType : Type * string * Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
Public Function AddEntityType (clrType As Type, definingNavigationName As String, definingEntityType As IMutableEntityType) As IMutableEntityType
Public Function AddEntityType (type As Type, definingNavigationName As String, definingEntityType As IMutableEntityType) As IMutableEntityType

パラメーター

clrTypetype
Type

このエンティティ型のインスタンスを表すために使用される CLR クラス。

definingNavigationName
String

ナビゲーションの定義。

definingEntityType
IMutableEntityType

定義するエンティティ型。

戻り値

新しいエンティティ型。

適用対象