Skip to content

TQueryLinqExtensions_Select_aQk1_nGv_5iP18vEm5cKXg

Jacob Spitzer edited this page Aug 28, 2022 · 2 revisions

TQueryLinqExtensions.Select<Table,TResult>(DbEc<Table>, Expression<Func<Table,TResult>>) Method

Projects the TQuery recordset into a new form of a result table by selecting specific columns or calculations to retrieve from the table.

public static DbEasyConnect.DbEcSelect<Table> Select<Table,TResult>(this DbEasyConnect.DbEc<Table> tQuery, System.Linq.Expressions.Expression<System.Func<Table,TResult>> selector);

Type parameters

Table
The type of the records of table class. need to be a class with the [Table("")] attribute.

TResult
The new form type of the fields and calculations returned by selector.

Parameters

tQuery DbEasyConnect.DbEc<Table>
An DbEc<T> that contains an queryable table to retrieve the new result type.

selector System.Linq.Expressions.Expression<System.Func<Table,TResult>>
An selection of the columns or calculations to be retrieved from the TQuery recordset. Example: tQuery.(x=> new { FullName = x.FirstName + x.LastName, Id = x.Id, AfterTax = x.Total * 1.15 });

Returns

DbEasyConnect.DbEcSelect<Table>
An DbEcSelect<T> whose records are projected into a new form of a record result.

Clone this wiki locally