- 修复 Firebird CodeFirst.SyncStructure 自增错误;d154a463a5d239c0a4ce848f2ac9c75dca84ec55

This commit is contained in:
2881099
2022-12-02 22:13:35 +08:00
parent ad0df485a3
commit e3d526ec6d
4 changed files with 33 additions and 4 deletions

View File

@ -22,6 +22,7 @@ namespace FreeSql.Generator
string ArgsConnectionString { get; }
string ArgsFilter { get; }
string ArgsMatch { get; }
string ArgsJson { get; }
string ArgsFileName { get; }
bool ArgsReadKey { get; }
internal string ArgsOutput { get; private set; }
@ -62,6 +63,7 @@ new Colorful.Formatter("v" + string.Join(".", typeof(ConsoleApp).Assembly.GetNam
ArgsNameSpace = "MyProject";
ArgsFilter = "";
ArgsMatch = "";
ArgsJson = "Newtonsoft.Json";
ArgsFileName = "{name}.cs";
ArgsReadKey = true;
Action<string> setArgsOutput = value =>
@ -94,7 +96,7 @@ new Colorful.Formatter("v" + string.Join(".", typeof(ConsoleApp).Assembly.GetNam
-NameOptions * 4个布尔值对应
首字母大写
首字母大写,其他小写
首字母大写其他小写
全部小写
下划线转驼峰
@ -116,6 +118,8 @@ new Colorful.Formatter("v" + string.Join(".", typeof(ConsoleApp).Assembly.GetNam
如果不想生成视图和存储过程 -Filter View+StoreProcedure
-Match 表名或正则表达式只生成匹配的表dbo\.TB_.+
-Json NTJ、STJ、NONE
Newtonsoft.Json、System.Text.Json、不生成
-FileName 文件名,默认:{name}.cs
-Output 保存路径,默认为当前 shell 所在目录
@ -196,6 +200,18 @@ new Colorful.Formatter("推荐在实体类目录创建 gen.bat双击它重新
if (Regex.IsMatch("", ArgsMatch)) { } //throw
a++;
break;
case "-json":
switch(args[a + 1].Trim().ToLower())
{
case "none":
ArgsJson = "";
break;
case "stj":
ArgsJson = "System.Text.Json";
break;
}
a++;
break;
case "-filename":
ArgsFileName = args[a + 1];
a++;