public IActionResult Get(RootRequestModel requestModel) { #region predicate Expression <Func <LocalizedProperty, bool> > where = x => true; if (!string.IsNullOrWhiteSpace(requestModel.Name)) { where = ExpressionHelpers.CombineAnd <LocalizedProperty>(where, a => a.LocaleKey.Contains(requestModel.Name)); } if (!string.IsNullOrWhiteSpace(requestModel.Content)) { where = ExpressionHelpers.CombineAnd <LocalizedProperty>(where, a => a.LocaleValue.Contains(requestModel.Content)); } #endregion var allLocalizedProperty = _localizedPropertyService.GetPagedList( where, x => x.Id, false, requestModel.Page - 1, requestModel.Count); if (allLocalizedProperty == null) { return(RespondFailure()); } var model = allLocalizedProperty; return(RespondSuccess(model, model.TotalCount)); }