Geeks With Blogs
Frank Wang's inspirations on .NET
IEnumerable<Inspiration> inspirations = from i in DataContext.Inspirations where i.Sharable == true select i
July 2008 Entries
Shorten your conditional statements with the ?? operator
I enjoy the new C# language features very much. Recently I started using the new ?? operator in my current projects. The ?? operator defines the default value to be returned when a nullable type is assigned to a non-nullable type. It is specially handy when you need to return a default value from your custom methods. A good example would be you wanted to capture the query string values in a web page but you needed to avoid the null reference exception in case the query string doesn't exist in the ......

Posted On Wednesday, July 16, 2008 3:14 PM

Execute Transact-SQL statement asynchronously
Processing a large amount of data from SQL server in .NET applications can be challenging some times. A common concern that people have is it just takes too much time to get the data from SQL. Waiting for the entire result set to return and then handling it require a great amount of RAM usage. That's not the worst thing yet. Imagine how frustrated your users can get when they have to wait for minutes after they click a button. A better designed application should utilize the asynchronous pattern ......

Posted On Saturday, July 5, 2008 3:33 PM

Copyright © Frank Wang | Powered by: