IService(TModel).SelectWhere(TResult) Method

Template MVC

IServiceTModelSelectWhereTResult 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.Interface
Assembly:  Template.Service (in Template.Service.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
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
See Also