Question

New to SubSonic, inherited it with a project that uses SubSonic 2.2.1 I have tried to added a column to one of my tables and run the tool to update the classes, The table name is Feedback and Feedback.cs added the new property but VFeedback.cs didn't, am I missing something?

Was it helpful?

Solution

By default, given a table named Feedback, SubSonic will generate Feedback.cs and FeedbackController.cs. VFeedback.cs sounds like something non-standard to SubSonic.

I'm guessing the person you inherited this project from is gone (else I would ask him first), so this is what I would look at:

  • I'm guessing you have more than 1 table in your database and corresponding generated files for each of your tables.
    • Do you have a corresponding V.cs class for each of the tables/generated files?
    • Do the V.cs files look more or less the same structure (i.e. like it was also generated)?
    • If the answer is yes to the last two questions, my guess is that your predecessor modified the default subsonic template files to output additional generated files (to add some custom behavior he needed). If not, maybe he wrote VFeedback.cs as a one off file.
  • Are you using the default SubSonic code/binaries from the SubSonic site or ones that you inherited?
    • If you are using SubSonic code/binaries that you inherited and running the tool did not generate a new VFeedback.cs, I'd guess it's a one off file.
  • Rollback your Feedback table to what you inherited from your predecessor. Run SubSonic (the default one you can download from the site) to generate a new Feedback.cs. Diff the old and new Feedback.cs files and see if you get the same thing. It'll give you an idea if your predecessor made custom modifications to SubSonic.

OTHER TIPS

VFeedback.cs might be partial cousin of your generated Feedback.cs class or it may be different class containing business logic etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top