SqlExpressionFactory.Select 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
Select(IEntityType, String, Expression) |
Obsolete.
Creates a new SelectExpression which represents a SELECT in a SQL tree projecting an entity type from a table source created using a custom SQL. |
Select(IEntityType) |
Creates a new SelectExpression which represents a SELECT in a SQL tree projecting an entity type from a table source created using default mapping in the model. |
Select(SqlExpression) |
Creates a new SelectExpression which represents a SELECT in a SQL tree projecting a SqlExpression or 1 from no table and without any composition. |
Select(IEntityType, TableExpressionBase) |
Creates a new SelectExpression which represents a SELECT in a SQL tree projecting an entity type from a table source. |
Select(IEntityType, String, Expression)
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
Caution
Use overload which takes TableExpressionBase by passing FromSqlExpression directly.
Creates a new SelectExpression which represents a SELECT in a SQL tree projecting an entity type from a table source created using a custom SQL.
public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression Select (Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, string sql, System.Linq.Expressions.Expression sqlArguments);
[System.Obsolete("Use overload which takes TableExpressionBase by passing FromSqlExpression directly.")]
public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression Select (Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, string sql, System.Linq.Expressions.Expression sqlArguments);
abstract member Select : Microsoft.EntityFrameworkCore.Metadata.IEntityType * string * System.Linq.Expressions.Expression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression
override this.Select : Microsoft.EntityFrameworkCore.Metadata.IEntityType * string * System.Linq.Expressions.Expression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression
[<System.Obsolete("Use overload which takes TableExpressionBase by passing FromSqlExpression directly.")>]
abstract member Select : Microsoft.EntityFrameworkCore.Metadata.IEntityType * string * System.Linq.Expressions.Expression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression
override this.Select : Microsoft.EntityFrameworkCore.Metadata.IEntityType * string * System.Linq.Expressions.Expression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression
Public Overridable Function Select (entityType As IEntityType, sql As String, sqlArguments As Expression) As SelectExpression
Parameters
- entityType
- IEntityType
An entity type to project.
- sql
- String
A custom SQL for the table source.
- sqlArguments
- Expression
An expression representing parameters passed to the custom SQL.
Returns
An expression representing a SELECT in a SQL tree.
Implements
- Attributes
Applies to
Select(IEntityType)
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
Creates a new SelectExpression which represents a SELECT in a SQL tree projecting an entity type from a table source created using default mapping in the model.
public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression Select (Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType);
abstract member Select : Microsoft.EntityFrameworkCore.Metadata.IEntityType -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression
override this.Select : Microsoft.EntityFrameworkCore.Metadata.IEntityType -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression
Public Overridable Function Select (entityType As IEntityType) As SelectExpression
Parameters
- entityType
- IEntityType
An entity type to project.
Returns
An expression representing a SELECT in a SQL tree.
Implements
Applies to
Select(SqlExpression)
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
Creates a new SelectExpression which represents a SELECT in a SQL tree projecting a SqlExpression or 1 from no table and without any composition.
public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression Select (Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression projection);
public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression Select (Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression? projection);
abstract member Select : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression
override this.Select : Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlExpression -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression
Public Overridable Function Select (projection As SqlExpression) As SelectExpression
Parameters
- projection
- SqlExpression
A SqlExpression to project.
Returns
An expression representing a SELECT in a SQL tree.
Implements
Applies to
Select(IEntityType, TableExpressionBase)
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
- Source:
- SqlExpressionFactory.cs
Creates a new SelectExpression which represents a SELECT in a SQL tree projecting an entity type from a table source.
public virtual Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression Select (Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Microsoft.EntityFrameworkCore.Query.SqlExpressions.TableExpressionBase tableExpressionBase);
abstract member Select : Microsoft.EntityFrameworkCore.Metadata.IEntityType * Microsoft.EntityFrameworkCore.Query.SqlExpressions.TableExpressionBase -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression
override this.Select : Microsoft.EntityFrameworkCore.Metadata.IEntityType * Microsoft.EntityFrameworkCore.Query.SqlExpressions.TableExpressionBase -> Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression
Public Overridable Function Select (entityType As IEntityType, tableExpressionBase As TableExpressionBase) As SelectExpression
Parameters
- entityType
- IEntityType
An entity type to project.
- tableExpressionBase
- TableExpressionBase
A table source to project from.
Returns
An expression representing a SELECT in a SQL tree.
Implements
Applies to
Entity Framework