NHibernate vs. SubSonic Another Look

Earlier I had compared NHibernate and SubSonic and chose SubSonic because it had migrations.  I’ve done two projects, one using SubSonic and the other using NHibernate and I can now compare the features a little better. NHibernate is documented better than I originally thought if you look at nhforge.com, not at the hibernate site.  It […]

Comparing Open Source ORM: SubSonic vs. NHibernate

ORM tools are probably one of the most time-saving tools for a web developer.  Nothing is more tedious than building a data access layer, adding caching or coordinating transactions.  Well okay, sometimes things like that are really fun, but when you’re trying to start a project out from scratch you want to get something up […]

The Open / Closed Principle

I just read a great article in MSDN Magazine (available online here) on the Open / Closed Principle from the Patterns in Practice column.  I really enjoyed it.  I’m going to have to spend some more time learning some more design patterns.  I’ve spent some time learning Model-View-Presenter (MVP) and Inversion of Control (IoC) but […]

Using var And Living With The Consequences

Another new feature added in C# 3.5 to accommodate anonymous types is the introduction of the var type keyword.  In his Coding Horror blog Jeff Atwood is extolling the virtues of using var to reduce type declaration redundancy.  His example is converting: StringBuilder sb = new StringBuilder(256); UTF8Encoding e = new UTF8Encoding(); MD5CryptoServiceProvider md5 = […]

Finding Common Values in Two Lists in C# Using LINQ

Finding common values in two lists is simple in .NET 3.5 thanks to LINQ!  I found this example here and here. In practice here is what I did: var currentOperatorFacilityIds = from fac in Facility.Facility.ListAllForOperator(this.OperatorId) select fac.ID; var deleteOperatorFacilityIds = from fac in Facility.Facility.ListAllForOperator(operatorId) select fac.ID; var commonFacilityIds = currentOperatorFacilityIds.Intersect(deleteOperatorFacilityIds); Really simple!  I love LINQ.