添加用户实体

This commit is contained in:
陈淳
2023-01-30 18:14:44 +08:00
parent 32b9611eb5
commit 5c5dfcac89
29 changed files with 760 additions and 30 deletions

View File

@@ -14,38 +14,38 @@ TemplateFactory templateFactory = new();
//string modelName = "Exhibition";
//string nameSpaces = "Yi.BBS";
//List<string> entityNames = new() { "Banner" };
//string modelName = "Forum";
//string nameSpaces = "Yi.BBS";
//List<string> entityNames = new() { "_" };
string modelName = "Identity";
string nameSpaces = "Yi.RBAC";
List<string> entityNames = new() { "User" };
//foreach (var entityName in entityNames)
//{
// templateFactory.CreateTemplateProviders((option) =>
// {
// option.Add(new ServiceTemplateProvider(modelName, entityName, nameSpaces));
// option.Add(new IServiceTemplateProvider(modelName, entityName, nameSpaces));
foreach (var entityName in entityNames)
{
templateFactory.CreateTemplateProviders((option) =>
{
option.Add(new ServiceTemplateProvider(modelName, entityName, nameSpaces));
option.Add(new IServiceTemplateProvider(modelName, entityName, nameSpaces));
// option.Add(new CreateInputVoTemplateProvider(modelName, entityName, nameSpaces));
// option.Add(new UpdateInputVoTemplateProvider(modelName, entityName, nameSpaces));
// option.Add(new GetListInputVoTemplateProvider(modelName, entityName, nameSpaces));
// option.Add(new GetListOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
// option.Add(new GetOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
option.Add(new CreateInputVoTemplateProvider(modelName, entityName, nameSpaces));
option.Add(new UpdateInputVoTemplateProvider(modelName, entityName, nameSpaces));
option.Add(new GetListInputVoTemplateProvider(modelName, entityName, nameSpaces));
option.Add(new GetListOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
option.Add(new GetOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
// option.Add(new ConstTemplateProvider(modelName, entityName, nameSpaces));
// option.Add(new ProfileTemplateProvider(modelName, entityName, nameSpaces));
// //option.Add(new ApiTemplateProvider(modelName, entityName));
// });
// //开始构建模板
// templateFactory.BuildTemplate();
// Console.WriteLine($"Yi.Framework.Template:{entityName}构建完成!");
//}
option.Add(new ConstTemplateProvider(modelName, entityName, nameSpaces));
option.Add(new ProfileTemplateProvider(modelName, entityName, nameSpaces));
//option.Add(new ApiTemplateProvider(modelName, entityName));
});
//开始构建模板
templateFactory.BuildTemplate();
Console.WriteLine($"Yi.Framework.Template:{entityName}构建完成!");
}
//Console.WriteLine("Yi.Framework.Template:模板全部生成完成!");
//Console.ReadKey();
Console.WriteLine("Yi.Framework.Template:模板全部生成完成!");
Console.ReadKey();
//根据模板文件生成项目文件
var template = "D:\\C#\\Yi\\Yi.Framework.Net6\\src\\project\\rbac";
FileHelper.AllInfoReplace(template, "Template", "RBAC");
//var template = "D:\\C#\\Yi\\Yi.Framework.Net6\\src\\project\\rbac";
//FileHelper.AllInfoReplace(template, "Template", "RBAC");