|
I have been working on CharterFishingGuide.com for the last few days, quite honestly I'm finding it difficult to get engaged. It's not really as sexy as some of the other work that I do, but I have hopes for a commercial success down the road. It seems that there is a bit of a hole out there, much of the market for this popular pastime is fragmented, with no real cultural hub for the activity. That's where this site comes in, with all the geek bells and whistles you would expect from yours truly.
The site is being written with VS2008, making use of Linq to SQL, my new best friend by the way....it really does make this stuff easy. My data has a CharterService class, which has Boat, and Fee Classes tucked into it as properties of List<Boat> and List<Fee>. For an insert of these 3 classes from a wizard control would have necessitated an insert of the parent class with an id return, and then a trip for each boat and fee class with the parent id appended. I would have also had to design the classes, and the stored procs or sql scripts for the operation.
DL.CFGDataContext dc = new CharterFishingGuide.DL.CFGDataContext();
dc.CharterServices.InsertOnSubmit(cs);
dc.SubmitChanges();
That code above literally replaces all of the aformentioned work, not to mention the creation of the classes, relationships etc. It's a huge timesaver. Of course I needed to create my database in a systematic way to help the tool work properly, using techniques like adding a "ParentID" column to child tables instead of using joining tables helped a great deal, although I think joining tables work, I have not had to use them yet.
For great info on this new tech, seriously check out the link in my previous post to the Channel 9 vids on the subject.
By hank on 2. December 2007 16:12 | Comments (0)
|