Nothing worse than trying to save a null to a string field! more Check if an expected integer is null or a passed in value more Check if an expected double is null or a passed in value more Create a string of unique words for searches more Sample Extension Method to extend filepaths more Extension method to wrap DateTime.TryParse more Extension method to get a word count more Trim a string to length more Extend LINQ OrderBy so you can pass in parameters dynamically in Method synta more You'll find a lot of other posts on other sites detailing how to create SEO friendly URL's - I've just tweaked it and made it into an extension ... more A solution various conditional lambda expressions without breaking the flow of the expression more Need to work out the lapsed time in years between a date and now? try this more Code for a convenient way to encode a string safe for javascript i.e. properly escaped more Extension method for decoding HTML - extension for HttpUtility.HtmlDecode more Get a human readable representation of time lapseds e.g. returns "one second ago" "a minute ago" "an hour ago" more Sample code using PredicateBuilder to do an OR search using LINQpad more Code to run directly in LINQPad demonstrating PredicateBuilder usuage with Northwind's Categories table more Try this codeyou can run directly in LINQPad to create a google sitemap more Start here to explore some very useful LINQ queries - you can cut and paste into LINQPad more Codeyou can run directly in LINQPad to create a conditional query more This returns either the results for whole search term (if successful) or AND all the words in the search term and try that more |