Solved: Why Linq Where.FirstOrDefault is faster than use FirstOrDefault with condition on an array?

Hi all.   Why applying “.Where(condition).FirstOrDefault()” is much faster than “.FirstOrDefault(condition) when it’s applied on an array?   Answer: While calling method Where() on an Array or a List, it’s optimized to use the enumerator of the source directly. But FirstOrDefault(), which doesn’t have this mechanism, runs the virtual method version

Continue reading

Official feedback about removing orphan collection in TFS 2013

Continued from: Remove orphan collection item without related database in TFS 2013 with Update 2   It’s announced that this will be fixed in Update 3 of TFS by Microsoft Officially. https://connect.microsoft.com/VisualStudio/feedback/details/874523/delete-a-collection-without-related-database-connected-vs2013u2   A workaround, editing database directly, is provided also. http://social.msdn.microsoft.com/Forums/en-US/cceec4ba-1712-4905-9e7b-8669bf81880f/damaged-project-collection-on-tfs-2013-no-solution-to-delete-it-from-server?forum=tfsadmin But you should keep in mind that editing

Continue reading