Created
July 9, 2019 10:02
-
-
Save Macadoshis/84589747109c43b211c3a023c945d16a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IPaginatorRespDom<StringPairItemDom> OnLazyReference(string pattern, int start, int rows) | |
{ | |
var withTranslationQuery = AsLabelTranslationsTranslatedQuery(x => x.Description, pattern); | |
Expression<Func<WithTranslation<MDMaterial, int>, bool>> filter = null; | |
if (isValidPattern(pattern)) | |
{ | |
filter = x => x.MdEntity.Name.ToUpper().Contains(pattern.ToUpper()); | |
} | |
return new PaginatorRespDom<StringPairItemDom>() | |
{ | |
Items = GetTranslatedPairItem<StringPairItemDom, int?>(withTranslationQuery, x => new StringPairItemDom() | |
{ | |
RefId = x.MdEntity.Id, | |
RefValue = x.TranslatedValue | |
}, start, rows, filter), | |
TotalResults = GetFieldDistinctCount( | |
withTranslationQuery, | |
x => x.MdEntity.Id | |
) | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment