score:0
Accepted answer
The only thing missing from the code was a working signature.
Expression<Func<Device, Object >> GetLambda()
In my case , SortingDevicesFilters was an enum that - with a proper switch - returns the appropriate filters.
So it is possible to return a linq lambda from a function.
Source: stackoverflow.com
Related Articles
- Get custom linq lambda for sorting
- How can you do custom sorting in LINQ with null always on the end?
- LINQ Source Code Available
- Custom Sorting using c# Linq Expressions
- LINQ Lambda efficiency of code groupby orderby
- Linq Custom sorting in ORDER BY and rest of result order by asc
- Convert xml to custom class using lambda linq
- Linq sorting of entity by custom property via reflection
- creating Linq to sqlite dbml from DbLinq source code
- Custom sorting with LINQ
- Sorting LINQ 'GroupBy' operator keys into a custom order
- Linq Custom Sorting
- Linq or Lambda - Method to allow custom Orderby clause on joined table
- Code practice to handle empty result set in Linq to custom list
- LINQ sorting of property List in List of custom object
- Custom sorting using LINQ and Function
- Compiling Error with LINQ Sorting Code Using List<T>
- source code for LINQ 101 samples
- Sorting list of strings using linq with custom sort
- Custom Sort in C# LINQ with LAMBDA
- C# Linq Lambda Expression for Entity Framework Query Passing Custom Expression to Where Condition
- LINQ - Entity framework code first - Grouped results to custom class
- MVC 3 LINQ Custom Sorting and Filtering with User-Specified Fields (Properties)
- LINQ lambda OrderByDescending on group by key.count() returning list of string of group by key for chart legend sorting
- LINQ - Sorting a custom list
- Complex LINQ sorting using Lambda Expressions
- Convert custom datatable sort to LINQ or lambda expressions
- Implicit operators, Linq and Lambda expressions can make code less readable. But what is more readable?
- c# Linq or code to extract groups from a single list of source data
- Sorting timespan using linq with custom string requirement
- Instantiate object from Linq to XML Query
- Returning a Distinct IQueryable with LINQ?
- Select table that has records existing in another table using LINQ
- Linq query to find items that could be within a range
- Trouble with checking for null in a SQL Compact query inside and MVC3 project
- Dynamic Linq Predicate throws "Unsupported Filter" error with C# MongoDB Driver
- Handle a Dynamic Select With Dyanmic Linq
- LINQ Check If DateRange Contains Named Day or Check if DateRange Contains a Weekend
- Comparing two datasources in C#
- Adding paging to ListView using model binding
- Looking for elegant / efficient solution for integer keyed collection of models
- Select XElements from comma separated values
- Odata & Entity Framework, Many to Many relationship won't update
- C# LINQ to Entities does not recognize the method
- Use DefaultIfEmpty to get default class values when using Union
- LINQ returning EnumerableRowCollection
- LINQ options.loadwith problem
- LINQ: Dot Notation vs Query Expression
- Better way to write this C# Code For List of Lists
- how do you add a condition to a lambda expression