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