Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

OrderByString

Extension methods to use strings in LINQ OrderBy and ThenBy methods Enable the extensions methods by including a reference and a "using OrderByExtensions;" statement

Supports the following formats:

    ().OrderBy("Property").ThenBy("OtherProperty");
    ().OrderBy("Property desc").ThenBy("OtherProperty desc");
    ().OrderByDescending("Property").ThenByDescending("OtherProperty");
    ().OrderBy("Property desc, OtherProperty asc");
    ().OrderBy("Property, OtherProperty desc");

.OrderBy and .ThenBy default to ascending, OrderByDescending and ThenByDescending default to descending

"asc" or "desc" in the text takes precedence over the default from the command so that ().OrderBy("Property asc") does the same thing as ().OrderByDescending("Property asc")

About

Extension methods to use strings in LINQ OrderBy and ThenBy methods

Resources

License

Releases

No releases published

Languages

You can’t perform that action at this time.