SubSonic Forums
All Your Database Are Belong To Us

Generate Class for 1 table

Latest post 08-22-2008 12:32 PM by yitzchok. 3 replies.
  • 08-21-2008 3:05 PM

    • chuck.boyer
    • Top 150 Contributor
    • Joined on 04-27-2008
    • Reston VA (Washington DC)
    • Posts 17

    Generate Class for 1 table

    Can I tell subcommander to only generate the class and controller for 1 table/view/sp?  As my project grows (as well as source control concerns), I'd like to only target the "newer" db entities I'm building.

     

    Thanks

    Chuck

    Filed under:
  • 08-21-2008 4:27 PM In reply to

    Re: Generate Class for 1 table

    You can set includeProcedureList=""  includeTableList=""  in the config file (Note: this uses Regex)

    If I am I because I am I, and You are You because You are You, then I am I, and you are you. But If I am I because You are You, and You are You because I am I, then I am not I and You are not You. -Rabbi of Kotzk

  • 08-21-2008 4:49 PM In reply to

    • chuck.boyer
    • Top 150 Contributor
    • Joined on 04-27-2008
    • Reston VA (Washington DC)
    • Posts 17

    Re: Generate Class for 1 table

    That's great, and I'm using that for things like the aspnet membership and roles. 

    In this case, I've added 2 or 3 cols to my table and I just need to regen the one class.  Don't get me wrong, it takes 5 seconds to do the whole project at this point.  But I'm concerned about a "very" large schema with more than a couple of hundered tables.  In addition, while using source control, if I'm working on table a, and my coworker is working on table b and we are using a shared development db, we now have some collision on the entire batch of generated files.

    Filed under:
  • 08-22-2008 12:32 PM In reply to

    Re: Generate Class for 1 table

    This is a great question about using Source control

    One thing you can do is check out how SubCommander is generating the code

    Now instead of doing what SubCommander does (generates all the tables) you can make some small application (or modify this one) that you pass in the table name and it will generate only the code for that table (The main code to generate the class takes a table do this shouldn't be to hard)

    If I am I because I am I, and You are You because You are You, then I am I, and you are you. But If I am I because You are You, and You are You because I am I, then I am not I and You are not You. -Rabbi of Kotzk

Page 1 of 1 (4 items) | RSS