Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Generation and T4 Text Templates #58

Open
kccarter76 opened this issue Jul 22, 2020 · 0 comments
Open

Code Generation and T4 Text Templates #58

kccarter76 opened this issue Jul 22, 2020 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@kccarter76
Copy link
Collaborator

kccarter76 commented Jul 22, 2020

Is your feature request related to a problem? Please describe.
As a developer, I want the ability to add SubSonicContext to my project via the add wizard and use a T4 template to generate classes and the database context for me.

Describe the solution you'd like

  1. On the solution explorer right click a folder location and go to the Add -> New Item
  2. Under Visual C# Items -> SubSonic
  3. Data Context, should appear as an option.
  4. when selected, wizard is started that allow the user to configure the following:
    • database connection, db name and the default schema.
    • schema name that contains user defined table types
    • default schema is "dbo"
  5. once confirmed, a T4 template is added to the project and using the connection:
    • Generates the table, procedure and view partial classes, if possible by convention mark a table with a corresponding defined table type.
    • If the generated class can not be marked with a defined table type, a non generated partial class can be used instead.
    • Generate SubSonic Data Context partial class
      • Context will contain ISubSonicSetCollections{TEntity} for each table and view.
      • At this time do not override OnDbConfiguring and OnDbModeling, will be implemented in a non generated partial class.
@kccarter76 kccarter76 added this to the Version 4.3.0 milestone Jul 22, 2020
@kccarter76 kccarter76 added the enhancement New feature or request label Jul 22, 2020
kccarter76 added a commit that referenced this issue Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant