Tag Archives: .NET

Checking for NULL using Entity Framework

Here is a curious gotcha using the Entity Framework: If you are filtering on a value that may be null then you may not be getting back the results you expect. For example, if you do something like this: var … Continue reading

Posted in Software Development | Tagged , , | Leave a comment

Handling bounces on Amazon SES

If you send to an email that does not exist, Amazon SES will perform some handling of the bounce before passing the details on to you. When you send email through Amazon SES you may notice that the email arrives … Continue reading

Posted in Software Development | Tagged , , , | 3 Comments

Verifying Senders with Amazon SES

I’ve already written a couple of pieces about Amazon Simple Email Service (SES) on sending Email and sending emails with attachments. Why do you have to verify senders? It is important to note that while in development mode you have … Continue reading

Posted in Software Development | Tagged , , , | 3 Comments

Sending more than a basic email with Amazon SES

Previously, I wrote about getting started with Amazon’s Simple Email Service, and I included details of how to send a basic email. The SendEmail method is excellent at sending basic emails with HTML or Text bodies. However, it doesn’t handle … Continue reading

Posted in Software Development | Tagged , , , , | 4 Comments

First(OrDefault) Vs. Single(OrDefault)

There are two mechanisms (each with an …OrDefault variant) in LINQ for getting one item out of an enumeration. They are First and Single. There is a difference between the two and you can produce code that functions incorrectly if … Continue reading

Posted in Software Development | Tagged , , | 1 Comment

Tip of the day: Expire a cookie, don’t remove it

I recently found a bug in my code that I couldn’t fathom initially until I walked through the HTTP headers in firebug. In short, you cannot simply remove a cookie by calling Remove(cookieName) on the HttpCookieCollection. That will have no … Continue reading

Posted in Software Development, Tip of the Day | Tagged , , , | Leave a comment

Installing a web site on a new server

Here are some blog posts that have been useful to me lately when I got caught out installing a website on a new server (I will eventually get that automated build and deploy process actually performing the deploy step successfully!!) … Continue reading

Posted in Software Development | Tagged , , , , , , | Leave a comment

LINQ query performance

A while ago I was reviewing some code and I came across some code that looked like this if (corpus.Where(a => a.SomeProperty == someValue).Count() > 0) { // Do Stuff } And it got me thinking that it may not … Continue reading

Posted in Software Development | Tagged , , , | 4 Comments

Tip of the day: Splitting a string when encountering whitespace

In .NET the string class has a Split method that splits the string at the separator character(s) that you specify. However, if you want to split the string at any instance of whitespace you don’t have to create a Split … Continue reading

Posted in Software Development, Tip of the Day | Tagged , | Leave a comment

Building messages in parallel

I recently saw some code where the developer was attempting to build up messages inside tasks that were being reported outside of the task. In a sequential system it is easy enough to do this. You have various options available … Continue reading

Posted in Software Development | Tagged , , , , , | Leave a comment