GenericService(TModel, TEntity).SelectWhere(TResult) Method

Template MVC

GenericServiceTModel, TEntitySelectWhereTResult Method

This function allows to select the specific properties and filter by where clause on database, not on memory, in that way it improves the performace

Namespace:  Template.Service.Core
Assembly:  Template.Service (in Template.Service.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public IEnumerable<TResult> SelectWhere<TResult>(
	Func<TModel, TResult> selector,
	Expression<Func<TModel, bool>> predicate
)

Parameters

selector
Type: SystemFuncTModel, TResult
The properties to select
predicate
Type: System.Linq.ExpressionsExpressionFuncTModel, Boolean
The where clause

Type Parameters

TResult
The select result type

Return Value

Type: IEnumerableTResult
The IEnumerable of the result

Implements

IServiceTModelSelectWhereTResult(FuncTModel, TResult, ExpressionFuncTModel, Boolean)
See Also