AdvancedWf.Data/Repositories/WorkflowTypesRepository.cs
/// <summary>
/// get collection of WorkflowType filtered based on DatatableParams Search property
/// </summary>
/// <param name="viewModel">Datatable filter/paging/sort details</param>
/// <param name="lst">collection of WorkflowType</param>
/// <returns>filtered collection of WorkflowType</returns>
get collection of WorkflowType filtered based on DatatableParams Search property
get collection of WorkflowType filtered based on DatatableParams Search property
private IQueryable<WorkflowTypesDTO> GetListSearched(DatatableParams viewModel, IQueryable<WorkflowTypesDTO> lst)
        {
            if (!string.IsNullOrEmpty(viewModel.search))
            {
                lst = lst
                .Where(a => a.Id.ToString().Contains(viewModel.search) ||
                 a.ArbicName.ToLower().Contains(viewModel.search.ToLower()) ||
                a.EnglishName.ToLower().Contains(viewModel.search.ToLower())
            );
            }
             return lst;
        }
private IQueryable < WorkflowTypesDTO > GetListSearched ( DatatableParams viewModel , IQueryable < WorkflowTypesDTO > lst ) { if ( ! string . IsNullOrEmpty ( viewModel . search ) ) { lst = lst . Where ( a => a . Id . ToString ( ) . Contains ( viewModel . search ) || a . ArbicName . ToLower ( ) . Contains ( viewModel . search . ToLower ( ) ) || a . EnglishName . ToLower ( ) . Contains ( viewModel . search . ToLower ( ) ) ) ; } return lst ; }
get collection of WorkflowType filtered based on DatatableParams Search property
get collection of WorkflowType filtered based on DatatableParams Search property
filtered collection of WorkflowType
filtered collection of WorkflowType
viewModel
DatatableParams
Datatable filter/paging/sort details
Datatable filter / paging / sort details
lst
IQueryable<WorkflowTypesDTO>
collection of WorkflowType
collection of WorkflowType