IConventionElementType 接口
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示集合属性的元素。
public interface IConventionElementType : Microsoft.EntityFrameworkCore.Metadata.IConventionAnnotatable, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyElementType
type IConventionElementType = interface
interface IReadOnlyElementType
interface IReadOnlyAnnotatable
interface IConventionAnnotatable
Public Interface IConventionElementType
Implements IConventionAnnotatable, IReadOnlyElementType
- 实现
注解
此接口在模型创建期间使用,并允许修改元数据。 生成模型后, IElementType 表示相同元数据的只读视图。
有关详细信息和示例,请参阅 模型生成约定 。
属性
Builder |
获取可用于配置此元素的生成器。 |
ClrType |
集合中的元素类型。 (继承自 IReadOnlyElementType) |
CollectionProperty |
获取此 表示元素的集合属性。 |
IsInModel |
指示此对象是否在模型中,即尚未从模型中删除。 (继承自 IConventionAnnotatable) |
IsNullable |
获取一个值,该值指示集合的元素是否可以为 |
Item[String] |
获取具有给定名称的批注的值,如果不存在,则返回 |
方法
扩展方法
FindRelationalTypeMapping(IReadOnlyElementType) |
返回 RelationalTypeMapping 最终模型上给定元素的 。 |
GetIsFixedLengthConfigurationSource(IConventionElementType) |
获取 ConfigurationSource 的 IsFixedLength(IReadOnlyElementType)。 |
GetRelationalTypeMapping(IReadOnlyElementType) |
返回 RelationalTypeMapping 最终模型上给定元素的 。 |
GetStoreType(IReadOnlyElementType) |
返回元素的数据库类型;如果找不到数据库类型, |
GetStoreTypeConfigurationSource(IConventionElementType) |
ConfigurationSource获取数据库类型的 。 |
IsFixedLength(IReadOnlyElementType) |
返回一个标志,该标志指示元素是否能够仅存储固定长度的数据,如字符串。 |
IsFixedLength(IReadOnlyElementType, StoreObjectIdentifier) |
返回一个标志,该标志指示元素是否能够仅存储固定长度的数据,如字符串。 |
SetIsFixedLength(IConventionElementType, Nullable<Boolean>, Boolean) |
设置一个标志,指示元素是否能够仅存储固定长度的数据,如字符串。 |
SetStoreType(IConventionElementType, String, Boolean) |
设置元素的数据库类型。 |
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈