IConventionModel.RemoveEntityType 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
RemoveEntityType(IConventionEntityType) |
从模型中删除实体类型。 |
RemoveEntityType(String) |
从模型中删除没有定义导航的实体类型。 |
RemoveEntityType(Type) |
从模型中删除实体类型。 |
RemoveEntityType(String, String, IConventionEntityType) |
删除具有给定类型的实体类型,定义导航名称和定义实体类型。 |
RemoveEntityType(Type, String, IConventionEntityType) |
删除具有给定类型的实体类型,定义导航名称和定义实体类型。 |
RemoveEntityType(IConventionEntityType)
从模型中删除实体类型。
public void RemoveEntityType (Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType);
public Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType RemoveEntityType (Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType);
public Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType? RemoveEntityType (Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType);
abstract member RemoveEntityType : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType -> unit
abstract member RemoveEntityType : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType -> Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType
Public Sub RemoveEntityType (entityType As IConventionEntityType)
Public Function RemoveEntityType (entityType As IConventionEntityType) As IConventionEntityType
参数
- entityType
- IConventionEntityType
要删除的实体类型。
返回
删除的实体类型; null
如果未找到实体类型,则为 。
适用于
RemoveEntityType(String)
从模型中删除没有定义导航的实体类型。
public Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType? RemoveEntityType (string name);
abstract member RemoveEntityType : string -> Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType
Public Function RemoveEntityType (name As String) As IConventionEntityType
参数
- name
- String
要删除的实体类型的名称。
返回
已删除的实体类型。
适用于
RemoveEntityType(Type)
从模型中删除实体类型。
public Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType? RemoveEntityType (Type type);
abstract member RemoveEntityType : Type -> Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType
Public Function RemoveEntityType (type As Type) As IConventionEntityType
参数
- type
- Type
要删除的实体类型。
返回
已删除的实体类型。
适用于
RemoveEntityType(String, String, IConventionEntityType)
删除具有给定类型的实体类型,定义导航名称和定义实体类型。
public Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType? RemoveEntityType (string name, string definingNavigationName, Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType definingEntityType);
abstract member RemoveEntityType : string * string * Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType -> Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType
Public Function RemoveEntityType (name As String, definingNavigationName As String, definingEntityType As IConventionEntityType) As IConventionEntityType
参数
- name
- String
要删除的实体类型的名称。
- definingNavigationName
- String
定义导航。
- definingEntityType
- IConventionEntityType
定义实体类型。
返回
已删除的实体类型。
适用于
RemoveEntityType(Type, String, IConventionEntityType)
删除具有给定类型的实体类型,定义导航名称和定义实体类型。
public Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType? RemoveEntityType (Type type, string definingNavigationName, Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType definingEntityType);
abstract member RemoveEntityType : Type * string * Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType -> Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType
Public Function RemoveEntityType (type As Type, definingNavigationName As String, definingEntityType As IConventionEntityType) As IConventionEntityType
参数
- type
- Type
用于表示此实体类型的实例的 CLR 类。
- definingNavigationName
- String
定义导航。
- definingEntityType
- IConventionEntityType
定义实体类型。
返回
已删除的实体类型。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈