Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Usage
- {
- public void Foo()
- {
- IList<Project> projects = new List<Project>();
- var sorted = projects.AsQueryable().SortAscending(x => x.Name); //<--- fuck magic strings
- }
- }
- public static class QueryExtensions
- {
- public static IQueryable<T> SortAscending<T, T2>(this IQueryable<T> source, Expression<Func<T, T2>> propertyName)
- {
Add Comment
Please, Sign In to add comment