DbExpressionBuilder.ThenBy 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.
Creates a new DbSortExpression that with a sort order that includes the sort order of the given order input set together with the specified sort key in ascending sort order and with default collation.
Overloads
ThenBy(DbSortExpression, Func<DbExpression,DbExpression>, String) |
Creates a new DbSortExpression that with a sort order that includes the sort order of the given order input set together with the specified sort key in ascending sort order and with the specified collation. |
ThenBy(DbSortExpression, Func<DbExpression,DbExpression>) |
Creates a new DbSortExpression that with a sort order that includes the sort order of the given order input set together with the specified sort key in ascending sort order and with default collation. |
ThenBy(DbSortExpression, Func<DbExpression,DbExpression>, String)
Creates a new DbSortExpression that with a sort order that includes the sort order of the given order input set together with the specified sort key in ascending sort order and with the specified collation.
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbSortExpression ^ ThenBy(System::Data::Common::CommandTrees::DbSortExpression ^ source, Func<System::Data::Common::CommandTrees::DbExpression ^, System::Data::Common::CommandTrees::DbExpression ^> ^ sortKey, System::String ^ collation);
public static System.Data.Common.CommandTrees.DbSortExpression ThenBy (this System.Data.Common.CommandTrees.DbSortExpression source, Func<System.Data.Common.CommandTrees.DbExpression,System.Data.Common.CommandTrees.DbExpression> sortKey, string collation);
static member ThenBy : System.Data.Common.CommandTrees.DbSortExpression * Func<System.Data.Common.CommandTrees.DbExpression, System.Data.Common.CommandTrees.DbExpression> * string -> System.Data.Common.CommandTrees.DbSortExpression
<Extension()>
Public Function ThenBy (source As DbSortExpression, sortKey As Func(Of DbExpression, DbExpression), collation As String) As DbSortExpression
Parameters
- source
- DbSortExpression
A DbSortExpression that specifies the ordered input set.
- sortKey
- Func<DbExpression,DbExpression>
A method that specifies how to derive the additional sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition.
- collation
- String
The collation to sort under.
Returns
A new DbSortExpression that represents the new overall order-by operation.
Exceptions
source
, sortKey
or collation
is null.
-or-
The expression produced by sortKey
is null.
source
does not have a collection result type.
-or-
The expression produced by sortKey
does not have an order-comparable string result type.
collation
is empty or contains only space characters.
Applies to
ThenBy(DbSortExpression, Func<DbExpression,DbExpression>)
Creates a new DbSortExpression that with a sort order that includes the sort order of the given order input set together with the specified sort key in ascending sort order and with default collation.
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbSortExpression ^ ThenBy(System::Data::Common::CommandTrees::DbSortExpression ^ source, Func<System::Data::Common::CommandTrees::DbExpression ^, System::Data::Common::CommandTrees::DbExpression ^> ^ sortKey);
public static System.Data.Common.CommandTrees.DbSortExpression ThenBy (this System.Data.Common.CommandTrees.DbSortExpression source, Func<System.Data.Common.CommandTrees.DbExpression,System.Data.Common.CommandTrees.DbExpression> sortKey);
static member ThenBy : System.Data.Common.CommandTrees.DbSortExpression * Func<System.Data.Common.CommandTrees.DbExpression, System.Data.Common.CommandTrees.DbExpression> -> System.Data.Common.CommandTrees.DbSortExpression
<Extension()>
Public Function ThenBy (source As DbSortExpression, sortKey As Func(Of DbExpression, DbExpression)) As DbSortExpression
Parameters
- source
- DbSortExpression
A DbSortExpression that specifies the ordered input set.
- sortKey
- Func<DbExpression,DbExpression>
A method that specifies how to derive the additional sort key expression given a member of the input set. This method must produce an expression with an order-comparable result type that provides the sort key definition.
Returns
A new DbSortExpression that represents the new overall order-by operation.
Exceptions
source
does not have a collection result type.
-or-
sortKey
does not have an order-comparable result type.