I’m just starting to play around with SubSonic, a nifty Rails-like DAL package that handles a lot of the goo for you. Smart Guy (tm) Steve Harman turned me on to this during a conversation some time ago and I’m just getting around to it.
The problem I ran in to right off the bat was that the wicked cool generation tool was giving me classes from the tables with nothing but using declarations in them. Completely emtpy classes. Not helpful.
It took me a bit, but I finally figured out that yes, you do need Primary Keys identified for each table you want to generate code against. I’d had an ID column created with an identity set, but no primary key defined. Duh.
I may have missed that in the numerous cool screencasts available on SubSonic’s site. It’s an easy fix, so now I’m off to finish up a project I’m playing with for my talk at the Ann Arbor Day of .NET.