Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

create expression func c# for use in where clause

private Expression<Func<PageElement, bool>> ActiveLanguageCheck(byte lang) {
    return pe => pe.PageElementLanguages.Where(
                    y => y.Active).Select(y => y.LanguageId).Contains(lang);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #expression #func #clause
ADD COMMENT
Topic
Name
1+8 =