Guest User

Untitled

a guest
May 27th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. public class Usage
  2. {
  3. public void Foo()
  4. {
  5. IList<Project> projects = new List<Project>();
  6. var sorted = projects.AsQueryable().SortAscending(x => x.Name); //<--- fuck magic strings
  7. }
  8. }
  9.  
  10. public static class QueryExtensions
  11. {
  12. public static IQueryable<T> SortAscending<T, T2>(this IQueryable<T> source, Expression<Func<T, T2>> propertyName)
  13. {
Add Comment
Please, Sign In to add comment