SmartCode.CLI
1.4.6
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global SmartCode.CLI --version 1.4.6
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local SmartCode.CLI --version 1.4.6
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=SmartCode.CLI&version=1.4.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package SmartCode.CLI --version 1.4.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SmartCode
SmartCode = IDataSource → IBuildTask → IOutput ⇒ Build Everything
Introduction

SmartCode.Db (Code generator)
Demo

Getting Started
- Install from .NET Core Global Tool
dotnet tool install --global SmartCode.CLI
- edit build configuration file (default: SmartCode.yml)
- the command line executes the SmartCode command.
- SmartCode
- wait for prompt to enter the configuration file path (optional: SmartCode.yml file in the default program root directory)
- carriage return execution command
- wait for the end of the task execution.
- View output directory results
Building configuration files
Module: SmartSql.Starter
Author: Ahoo Wang
DataSource:
Name: Db
Paramters:
DbName: SmartSqlStarterDB
DbProvider: SqlServer
ConnectionString: Data Source=.;Initial Catalog=SmartSqlStarterDB;Integrated Security=True
Language: CSharp
TemplateEngine: Razor
Output:
Type: File
Path: 'E://SmartSql-Starter'
Build:
ClearDir:
Type: Clear
Paramters:
Dirs: '.'
Solution:
Type: Project
Template: Sln.cshtml
Output:
Path: '.'
Name: '{{Project.Module}}'
Extension: '.sln'
SmartSqlConfig:
Type: Project
Template: SqlMapConfig.cshtml
Output:
Path: '{{Project.Module}}.API'
Name: 'SmartSqlMapConfig'
Extension: '.xml'
Entity_Project:
Type: Project
Template: Proj.cshtml
Output:
Path: '{{Project.Module}}.Entity'
Name: '{{Project.Module}}.Entity'
Extension: '.csproj'
Entity:
Type: Table
Module: Entity
Template: Entity.cshtml
Output:
Path: '{{Project.Module}}.{{Build.Module}}'
Extension: '.cs'
NamingConverter:
Table:
Tokenizer:
Type: Default
Paramters:
IgnorePrefix: 'T_'
Delimiter: '_'
Converter:
Type: Default
Paramters: { }
View:
Tokenizer:
Type: Default
Paramters:
IgnorePrefix: 'V_'
Delimiter: '_'
Converter:
Type: Pascal
Column:
Tokenizer:
Type: Default
Paramters:
Delimiter: '_'
Converter:
Type: Pascal
Repository_Project:
Type: Project
Template: Proj-Repository.cshtml
Output:
Path: '{{Project.Module}}.Repository'
Name: '{{Project.Module}}.Repository'
Extension: '.csproj'
Repository:
Type: Table
Module: Repository
Template: Repository.cshtml
Output:
Path: '{{Project.Module}}.{{Build.Module}}'
Name: 'I{{OutputName}}Repository'
Extension: .cs
NamingConverter:
Table:
Tokenizer:
Type: Default
Paramters:
IgnorePrefix: 'T_'
Delimiter: '_'
Converter:
Type: Default
View:
Tokenizer:
Type: Default
Paramters:
IgnorePrefix: 'V_'
Delimiter: '_'
Converter:
Type: Default
SqlMap:
Type: Table
Template: SqlMap-SqlServer.cshtml
Output:
Path: '{{Project.Module}}.API/Maps'
Extension: .xml
IgnoreTables: null
NamingConverter:
Table:
Tokenizer:
Type: Default
Paramters:
IgnorePrefix: 'T_'
Delimiter: '_'
Converter:
Type: Default
View:
Tokenizer:
Type: Default
Paramters:
IgnorePrefix: 'V_'
Delimiter: '_'
Converter:
Type: Default
Column:
Tokenizer:
Type: Default
Paramters:
IgnorePrefix: 'T_'
Delimiter: '_'
Converter:
Type: Default
| Parameter Name | Description |
|---|---|
| Module | Root Module Name |
| Author | Author |
| DataSource | Data Source |
| Language | Language: CSharp/Java/.... |
| TemplateEngine | Template Engine: Currently Built: Razor/Handlebars |
| Output | Output |
| Build | Task Build |
DataSource Data Source, Name: Db
Property Name: Db, using the DbSource plugin as a data source
DbSource.Paramters accepts the following three parameters:
| Parameter Name | Description |
|---|---|
| DbName | Database Name |
| DbProvider | Data Drivers: MySql, MariaDB, PostgreSql, SqlServer, Oracle, SQLite |
| ConnectionString | Connection String |
Build Task Build
| Parameter Name | Description |
|---|---|
| Type | Build type, Clear: used to clean up the directory s / file s, Project: used to build a single file, such as: solution file / project file, Table: used to build a data table-based file, such as: Entity , Repository file |
| Module | Building Module Name |
| TemplateEngine | Template Engine, optional, default to root module engine |
| Template | Template File |
| Output | Output |
| IncludeTables | Include table name s |
| IgnoreTables | Ignore table name s |
| NamingConverter | Named Converter |
| Paramters | Custom Build Parameters |
NamingConverter Name Conversion
| Attribute | Description |
|---|---|
| Type | Table/View/Column |
| Tokenizer | Word Segmenter |
| Converter | Converter: Camel/Pascal/None |
NamingConverter.Tokenizer Word Segmenter
| Attribute | Description |
|---|---|
| Type | Default |
| Paramters.IgnorePrefix | Ignore prefix characters |
| Paramters.Delimiter | Separator |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.1 | 2,798 | 6/16/2022 |
| 3.0.0 | 2,113 | 3/3/2022 |
| 2.4.0-preview.1 | 280 | 6/15/2022 |
| 2.4.0-preview.0 | 325 | 5/7/2022 |
| 2.3.7 | 2,088 | 3/3/2022 |
| 2.3.6 | 2,875 | 6/10/2020 |
| 2.3.5 | 2,239 | 4/29/2020 |
| 2.3.4 | 2,164 | 3/27/2020 |
| 2.3.3 | 1,892 | 3/27/2020 |
| 2.3.2 | 2,095 | 3/11/2020 |
| 2.3.1 | 2,272 | 3/11/2020 |
| 2.3.0 | 2,145 | 3/11/2020 |
| 2.2.95 | 2,052 | 2/17/2020 |
| 2.2.94 | 2,048 | 2/14/2020 |
| 2.2.93 | 2,165 | 2/14/2020 |
| 2.2.92 | 2,112 | 11/18/2019 |
| 2.2.90 | 2,233 | 11/12/2019 |
| 2.2.88 | 2,253 | 10/30/2019 |
| 2.2.86 | 2,119 | 10/23/2019 |
| 1.4.6 | 2,612 | 10/18/2018 |
Loading failed