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

Conditiional Database project configuration switch #23

Merged
merged 6 commits into from
Jan 17, 2024

Conversation

garywoodfine
Copy link
Contributor

@garywoodfine garywoodfine commented Jan 17, 2024

Ticket

22

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Enhancement
  • Bug Fix
  • Optimization
  • Documentation Update

Rationale

Currently the ability exists to create database projects for either MSSQL or PostgreSQL, so we wanted to make it easier to generate new solutions and define the target Database engine.

Implementation

Implemented additional switches command on the project generation making use of the Conditional processing and comment syntax , to enable the addition of conditional, or dynamic, content you can add Template Engine expressions in your source files. The conditional expression let you to include or exclude part of the file according to a specified condition, and to do this you can use the familiar conditional expressions like #if, #else, #elseif, #endif.

Refactored the project templates to make use this functionality

Gary Woodfine added 3 commits January 17, 2024 12:39
A "Ticket" section was added to the pull request template. This change provides a space for developers to add the link that connects the pull request to its related issue. This will make tracking easier and increase the visibility of related work.
This commit involves the removal of the database-specific solutions, i.e., MSSQL and Postgre, from the project. It includes the deletion of configuration files, project references, test setup files, and exception handling components pertaining to these solutions. With these deleted, the project setup is streamlined, and only the main solution remains.
The API solution template documentation has been updated to include an optional switch for the creation of a PostgreSQL database configuration. Additional command explanation and file structure changes have been outlined for further clarity. The necessary modifications for running Docker-compose in your project have also been specified.
@garywoodfine garywoodfine self-assigned this Jan 17, 2024
Gary Woodfine added 3 commits January 17, 2024 19:59
Added boolean configuration parameters to enable choice between MSSQL and Postgre in the database and model configuration templates. Also, updated relevant .cs files to conditionally use configurations based on these parameters. Modified the pull request template to have a correct ticket link syntax.
The model configuration documentation has been updated to include more detailed instructions for generating a new Model Configuration class for PostgreSQL databases. An additional optional parameter `--usePOSTGRE` has been introduced. This option, along with the existing parameters, has been listed out for better visibility. A typo in the code example has also been fixed.
This update changes the 'Database project template' page in the documentation. It introduces how to generate a PostgreSQL project using the `--usePOSTGRE` switch. Furthermore, it explains several additional switches that users can utilize when creating their database project.
@garywoodfine garywoodfine marked this pull request as ready for review January 17, 2024 20:26
@garywoodfine garywoodfine merged commit 93e9b86 into master Jan 17, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant