I have been using Linq to SQL very successfully. However, today I have run into what I believe to be a severe bug. Example code: var highScore = (from s in context.SubjectScores where s.SubjectID == StateManager.CurrentSubjectID && s.UserID == Common.CurrentUserKey orderby s.Score descending select s.Score).FirstOrDefault(); This should make highScore = 0 if no records are found. Instead it throws an InvalidOperationException: Sequence contains no elements. Ok, thats not good... but there is no way
Read More...