RelationalTypeMappingSourceExtensions.GetMapping 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
GetMapping(IRelationalTypeMappingSource, IProperty) |
获取给定属性的关系数据库类型,如果未找到映射,则引发该类型。 |
GetMapping(IRelationalTypeMappingSource, String) |
获取表示给定数据库类型的映射,如果未找到映射,则引发该映射。 |
GetMapping(IRelationalTypeMappingSource, Type) |
获取给定 .NET 类型的关系数据库类型,如果未找到映射,则引发该类型。 |
GetMapping(IRelationalTypeMappingSource, Type, IModel) |
获取给定 .NET 类型的关系数据库类型,如果未找到映射,则引发该类型。 |
GetMapping(IRelationalTypeMappingSource, IProperty)
获取给定属性的关系数据库类型,如果未找到映射,则引发该类型。
public static Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping GetMapping (this Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource typeMappingSource, Microsoft.EntityFrameworkCore.Metadata.IProperty property);
static member GetMapping : Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource * Microsoft.EntityFrameworkCore.Metadata.IProperty -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
<Extension()>
Public Function GetMapping (typeMappingSource As IRelationalTypeMappingSource, property As IProperty) As RelationalTypeMapping
参数
- typeMappingSource
- IRelationalTypeMappingSource
类型映射源。
- property
- IProperty
要获取其映射的属性。
返回
要使用的类型映射。
适用于
GetMapping(IRelationalTypeMappingSource, String)
获取表示给定数据库类型的映射,如果未找到映射,则引发该映射。
public static Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping GetMapping (this Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource typeMappingSource, string typeName);
static member GetMapping : Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource * string -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
<Extension()>
Public Function GetMapping (typeMappingSource As IRelationalTypeMappingSource, typeName As String) As RelationalTypeMapping
参数
- typeMappingSource
- IRelationalTypeMappingSource
类型映射源。
- typeName
- String
要获取其映射的类型。
返回
要使用的类型映射。
注解
请注意,有时相同的存储类型可以有不同的映射;此方法返回默认值。
适用于
GetMapping(IRelationalTypeMappingSource, Type)
获取给定 .NET 类型的关系数据库类型,如果未找到映射,则引发该类型。
public static Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping GetMapping (this Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource typeMappingSource, Type clrType);
static member GetMapping : Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource * Type -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
<Extension()>
Public Function GetMapping (typeMappingSource As IRelationalTypeMappingSource, clrType As Type) As RelationalTypeMapping
参数
- typeMappingSource
- IRelationalTypeMappingSource
类型映射源。
- clrType
- Type
要获取其映射的类型。
返回
要使用的类型映射。
适用于
GetMapping(IRelationalTypeMappingSource, Type, IModel)
获取给定 .NET 类型的关系数据库类型,如果未找到映射,则引发该类型。
public static Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping GetMapping (this Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource typeMappingSource, Type clrType, Microsoft.EntityFrameworkCore.Metadata.IModel model);
static member GetMapping : Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMappingSource * Type * Microsoft.EntityFrameworkCore.Metadata.IModel -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
<Extension()>
Public Function GetMapping (typeMappingSource As IRelationalTypeMappingSource, clrType As Type, model As IModel) As RelationalTypeMapping
参数
- typeMappingSource
- IRelationalTypeMappingSource
类型映射源。
- clrType
- Type
要获取其映射的类型。
- model
- IModel
模型。
返回
要使用的类型映射。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈