RelationalEntityTypeExtensions.SetSqlQuery 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
SetSqlQuery(IMutableEntityType, String) |
设置用于为实体类型提供数据的 SQL 字符串。 |
SetSqlQuery(IConventionEntityType, String, Boolean) |
设置用于为实体类型提供数据的 SQL 字符串。 |
SetSqlQuery(IMutableEntityType, String)
设置用于为实体类型提供数据的 SQL 字符串。
public static void SetSqlQuery (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string name);
public static void SetSqlQuery (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string? name);
static member SetSqlQuery : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * string -> unit
<Extension()>
Public Sub SetSqlQuery (entityType As IMutableEntityType, name As String)
参数
- entityType
- IMutableEntityType
实体类型。
- name
- String
要设置的 SQL 字符串。
适用于
SetSqlQuery(IConventionEntityType, String, Boolean)
设置用于为实体类型提供数据的 SQL 字符串。
public static string SetSqlQuery (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string name, bool fromDataAnnotation = false);
public static string? SetSqlQuery (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, string? name, bool fromDataAnnotation = false);
static member SetSqlQuery : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * string * bool -> string
<Extension()>
Public Function SetSqlQuery (entityType As IConventionEntityType, name As String, Optional fromDataAnnotation As Boolean = false) As String
参数
- entityType
- IConventionEntityType
实体类型。
- name
- String
要设置的 SQL 字符串。
- fromDataAnnotation
- Boolean
指示配置是否是使用数据注释指定的。
返回
配置的值。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈