RelationalEntityTypeExtensions.SetSqlQuery Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SetSqlQuery(IMutableEntityType, String) |
Sets the SQL string used to provide data for the entity type. |
SetSqlQuery(IConventionEntityType, String, Boolean) |
Sets the SQL string used to provide data for the entity type. |
SetSqlQuery(IMutableEntityType, String)
Sets the SQL string used to provide data for the entity type.
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)
Parameters
- entityType
- IMutableEntityType
The entity type.
- name
- String
The SQL string to set.
Applies to
SetSqlQuery(IConventionEntityType, String, Boolean)
Sets the SQL string used to provide data for the entity type.
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
Parameters
- entityType
- IConventionEntityType
The entity type.
- name
- String
The SQL string to set.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The configured value.
Applies to
Entity Framework