views:

25

answers:

1

I am trying to get Subsonic(3.0.0.4) to work(.Net 3.5 - VS2010), simple install that looks at the Northwind database using ActiveRecord. I used the 5 minute demo from http://subsonicproject.com/docs/The_5_Minute_Demo. I added the reference to the dll, un-blocked the T4 templates that I downloaded, changed the Settings.ttinclude to point to the northwind database in 3 places as per video. Dragged the T4 templates (as per video) to my Models folder in VS2010.

If I compile I keep on getting "Type or namespace name 'something' could not be found" There are 13 error (same amount as the amount of tables in the DB..) so I am guessing that there must be some command that turns every table into a class, but where? I right-clicked on ActiveRecord.tt and Context.tt and selected "Run custom tool" with no success.

Any help, I follow this demo to the letter and still get the error. Any help.. please?

A: 

Ok, I do not know why but after I added Structs.tt it compiled fine. I still could not get the foreach in the view to work, the error was: foreach statement cannot operate on variables of type 'object' because 'object' does not contain a public definition for 'GetEnumerator'

I could see out of the corner of Rob's video that it die not inherit from System.Web.Mvc.ViewPage and figured out that it should be System.Web.Mvc.ViewPage>

Sometimes clever people(Like Rob) cannot think for proper dummies(like me) Such is life?

Jack Smit

related questions