views:

19

answers:

1

Hi,

I have a new app that I am starting tomorrow based on SubSonic3 (ActiveRecord) and ASP.NET MVC. In thinking through how to organize the models layer, I know I'd like to extend most if not all of the models and add functionality (like virtual attributes, etc.) in a similar way that I do now with Rails.

I've used SS2 in the past but this is my first project with SS3/ActiveRecord. I'm planning to use the tt templates to (auto)generate my models; how do I go about extending those classes? Partials?

Many thanks!

Chris

A: 

Partial Classes shall be your friend!

(link added for those who may not be familiar with partials)

Also just found this gem in the SubSonic 3 FAQ. Check the first question.

SubSonic 3 Frequently Asked Questions

Justin Niessner