Posts

A Limitation of Lambda Expressions and Overloaded Extension Methods

Tamir hates lambdas. He was having a problem with one of his lambda expressions and twittered about it. Around that time I opened my twitter account (yes, Yosi finally convinced me) and offered my help…. You can read the copy of the original post, or if that goes down too, you can try the Wayback Machine’s copy of it. Context: This post was automatically imported from my old blog, which was originally hosted on Microsoft’s ASP.NET Community Blogs. When they shut it down, I dumped all of my old posts to Wordpress. You can still check out the original blog on the Wayback Machine.
2008-05-07
1 min read

Linq to SQL: ChangeConflictException With "WHERE 0 = 1"

I just finished debugging a very annoying error, where I kept getting a ChangeConflictException with the message “Row not found or changed” while trying to update my data. I found that there were no Member Conflicts in the exception, which seemed really weird to me…. You can read the copy of the original post, or if that goes down too, you can try the Wayback Machine’s copy of it. Context: This post was automatically imported from my old blog, which was originally hosted on Microsoft’s ASP.NET Community Blogs. When they shut it down, I dumped all of my old posts to Wordpress. You can still check out the original blog on the Wayback Machine.
2008-04-28
1 min read

Linq: FirstOrFallback

Sometimes you want to use FirstOrDefault, but the default value of T is a valid value that might get returned. If you used FirstOrDefault, you wouldn’t know whether the value that you got is a valid first or the default fallback. I use FirstOrFallback to explicitly specify which fallback value I want, rather than always use default(T):… You can read the copy of the original post, or if that goes down too, you can try the Wayback Machine’s copy of it.
2008-04-23
1 min read