- Notifications
You must be signed in to change notification settings - Fork1
Fizzcode DbTools open source project
License
FizzCodeSoftware/DbTools
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
The two main usage of DbTools is
- Describe a database schema and properties in C# code, with the ability to generate the database on multiple database engines
- Provide a command line tool, DbTools.Console to execute DbTools functions (examples: generating database documentation or comparison to an Excel file, generate database definition as .cs files)
A very simple database definition looks like this (fromTestDatabaseSimpleTyped.cs):
namespaceFizzCode.DbTools.DataDefinition.Tests{usingFizzCode.DbTools.DataDefinition.Generic;usingFizzCode.DbTools.TestBase;publicclassTestDatabaseSimpleTyped:TestDatabaseDeclaration{publicCompanyCompany{get;}=newCompany();}publicclassCompany:SqlTable{publicSqlColumnId{get;}=Generic1.AddInt32().SetPK().SetIdentity();publicSqlColumnName{get;}=Generic1.AddNVarChar(100);}}
Build, and run FizzCode.DbTools.Console.exe(DbTools\artifacts\bin\DbTools.Console\debug\FizzCode.DbTools.Console.exe)
Option examples:
FizzCode.DbTools.Console.exe document --connectionString "<connection string>" --sqlType MsSql2016 --patternFileName "" --flags None
FizzCode.DbTools.Console.exe changedocument --connectionStringOriginal "<connection string>" --connectionStringNew "<connection string>" --sqlTypeOriginal MsSql2016 --sqlTypeNew MsSql2016 --patternFileName "" --patternFileNameOriginal "" --patternFileNameNew "" --flags None
See LICENSE.
Regarding pull requests or any contribution
- we need a signed CLA (Contributor License Agreement)
- only code which comply with .editorconfig is accepted
Console project which accepts commands to execute DbTools features.
Contains classes for database definitions.
Generates database documentation from DatabaseDefinition.
Executes the database creation sql commands from the DataDefinitionGenerator, to create the database.
Generates executable sql to create database from DatabaseDefinition.
Builds DatabaseDefinition from an existing database.
Generates data, typically for testing purposes, based on DatabaseDefinition.
Contains helper classes for unit testing DbTools.
Configuration values are stored in config.json files.Configuration values for tests are stored in testconfig.json files.
You can use local config values to override content of these files, which are local (developer specific), or not desired to be included in source control (for example, a connection string with username and password to an internal environment).Use naming as config-local.json and testconfig-local.json.
To run unit tests in parallel between assemblies, you have to enable it by selecting Test Explorer / Configure Run Settings / Select solution wide runsettings file, and then select the file \Tests\test.runsettings
About
Fizzcode DbTools open source project
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.