Ai
40 Star 384 Fork 108

Mr'hu/Gardener

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CodeGenerationExtensions.cs 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
Mr'hu 提交于 2024-06-06 18:10 +08:00 . feat:代码生成支持配置字段信息
// -----------------------------------------------------------------------------
// 园丁,是个很简单的管理系统
// gitee:https://gitee.com/hgflydream/Gardener
// issues:https://gitee.com/hgflydream/Gardener/issues
// -----------------------------------------------------------------------------
using Gardener.Core.CodeGeneration.Impl.Services;
using Gardener.Core.CodeGeneration.Services;
using Gardener.Core.Module;
using Microsoft.Extensions.DependencyInjection;
namespace Gardener.Core.CodeGeneration.Impl
{
/// <summary>
/// 代码生成
/// </summary>
public static class CodeGenerationExtensions
{
/// <summary>
/// 添加代码生成
/// </summary>
/// <param name="services"></param>
/// <param name="enableAutoVerification"></param>
/// <returns></returns>
public static IServiceCollection AddCodeGeneration(this IServiceCollection services, bool enableAutoVerification = true)
{
services.AddSingleton<IServerModule, CodeGenerationServerModule>();
services.AddScoped<IEntityConfigService, EntityConfigService>();
services.AddScoped<IFieldConfigService, FieldConfigService>();
services.AddRestController<CodeGenerationService>();
services.AddRestController<EntityConfigService>();
services.AddRestController<FieldConfigService>();
services.AddRestController<GenerateTemplateService>();
return services;
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/hgflydream/Gardener.git
git@gitee.com:hgflydream/Gardener.git
hgflydream
Gardener
Gardener
v3

搜索帮助