开发者

Subsonic 2.2 not updating sql changes in the V class

开发者 https://www.devze.com 2022-12-20 09:10 出处:网络
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 n开发者_如何学Came is Feedba

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 n开发者_如何学Came is Feedback and Feedback.cs added the new property but VFeedback.cs didn't, am I missing something?


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消