Merge branch 'refs/heads/abp' into digital-collectibles
# Conflicts: # Yi.Abp.Net8/src/Yi.Abp.Web/YiAbpWebModule.cs
This commit is contained in:
@@ -9,84 +9,89 @@ using Microsoft.OpenApi.Any;
|
|||||||
using Microsoft.OpenApi.Models;
|
using Microsoft.OpenApi.Models;
|
||||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||||
using Volo.Abp.AspNetCore.Mvc;
|
using Volo.Abp.AspNetCore.Mvc;
|
||||||
|
using Volo.Abp.DependencyInjection;
|
||||||
|
using Volo.Abp.Options;
|
||||||
|
|
||||||
namespace Yi.Framework.AspNetCore.Microsoft.Extensions.DependencyInjection
|
namespace Yi.Framework.AspNetCore.Microsoft.Extensions.DependencyInjection
|
||||||
{
|
{
|
||||||
public static class SwaggerAddExtensions
|
public static class SwaggerAddExtensions
|
||||||
{
|
{
|
||||||
public static IServiceCollection AddYiSwaggerGen<Program>(this IServiceCollection services, Action<SwaggerGenOptions>? action=null)
|
public static IServiceCollection AddYiSwaggerGen<Program>(this IServiceCollection services,
|
||||||
|
Action<SwaggerGenOptions>? action = null)
|
||||||
{
|
{
|
||||||
|
var mvcOptions = services.GetPreConfigureActions<AbpAspNetCoreMvcOptions>().Configure();
|
||||||
var serviceProvider = services.BuildServiceProvider();
|
|
||||||
var mvcOptions = serviceProvider.GetRequiredService<IOptions<AbpAspNetCoreMvcOptions>>();
|
var mvcSettings =
|
||||||
|
mvcOptions.ConventionalControllers.ConventionalControllerSettings.DistinctBy(x => x.RemoteServiceName);
|
||||||
var mvcSettings = mvcOptions.Value.ConventionalControllers.ConventionalControllerSettings.DistinctBy(x => x.RemoteServiceName);
|
|
||||||
|
|
||||||
|
|
||||||
services.AddAbpSwaggerGen(
|
services.AddAbpSwaggerGen(
|
||||||
options =>
|
options =>
|
||||||
{
|
|
||||||
if (action is not null)
|
|
||||||
{
|
{
|
||||||
action.Invoke(options);
|
if (action is not null)
|
||||||
}
|
|
||||||
|
|
||||||
// 配置分组,还需要去重,支持重写,如果外部传入后,将以外部为准
|
|
||||||
foreach (var setting in mvcSettings.OrderBy(x => x.RemoteServiceName))
|
|
||||||
{
|
|
||||||
if (!options.SwaggerGeneratorOptions.SwaggerDocs.ContainsKey(setting.RemoteServiceName))
|
|
||||||
{
|
{
|
||||||
options.SwaggerDoc(setting.RemoteServiceName, new OpenApiInfo { Title = setting.RemoteServiceName, Version = "v1" });
|
action.Invoke(options);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 根据分组名称过滤 API 文档
|
// 配置分组,还需要去重,支持重写,如果外部传入后,将以外部为准
|
||||||
options.DocInclusionPredicate((docName, apiDesc) =>
|
foreach (var setting in mvcSettings.OrderBy(x => x.RemoteServiceName))
|
||||||
{
|
|
||||||
if (apiDesc.ActionDescriptor is ControllerActionDescriptor controllerActionDescriptor)
|
|
||||||
{
|
{
|
||||||
var settingOrNull = mvcSettings.Where(x => x.Assembly == controllerActionDescriptor.ControllerTypeInfo.Assembly).FirstOrDefault();
|
if (!options.SwaggerGeneratorOptions.SwaggerDocs.ContainsKey(setting.RemoteServiceName))
|
||||||
if (settingOrNull is not null)
|
|
||||||
{
|
{
|
||||||
return docName == settingOrNull.RemoteServiceName;
|
options.SwaggerDoc(setting.RemoteServiceName,
|
||||||
|
new OpenApiInfo { Title = setting.RemoteServiceName, Version = "v1" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
options.CustomSchemaIds(type => type.FullName);
|
// 根据分组名称过滤 API 文档
|
||||||
var basePath = Path.GetDirectoryName(typeof(Program).Assembly.Location);
|
options.DocInclusionPredicate((docName, apiDesc) =>
|
||||||
if (basePath is not null)
|
|
||||||
{
|
|
||||||
foreach (var item in Directory.GetFiles(basePath, "*.xml"))
|
|
||||||
{
|
{
|
||||||
options.IncludeXmlComments(item, true);
|
if (apiDesc.ActionDescriptor is ControllerActionDescriptor controllerActionDescriptor)
|
||||||
|
{
|
||||||
|
var settingOrNull = mvcSettings
|
||||||
|
.Where(x => x.Assembly == controllerActionDescriptor.ControllerTypeInfo.Assembly)
|
||||||
|
.FirstOrDefault();
|
||||||
|
if (settingOrNull is not null)
|
||||||
|
{
|
||||||
|
return docName == settingOrNull.RemoteServiceName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
options.CustomSchemaIds(type => type.FullName);
|
||||||
|
var basePath = Path.GetDirectoryName(typeof(Program).Assembly.Location);
|
||||||
|
if (basePath is not null)
|
||||||
|
{
|
||||||
|
foreach (var item in Directory.GetFiles(basePath, "*.xml"))
|
||||||
|
{
|
||||||
|
options.IncludeXmlComments(item, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
options.AddSecurityDefinition("JwtBearer", new OpenApiSecurityScheme()
|
||||||
|
{
|
||||||
|
Description = "直接输入Token即可",
|
||||||
|
Name = "Authorization",
|
||||||
|
In = ParameterLocation.Header,
|
||||||
|
Type = SecuritySchemeType.Http,
|
||||||
|
Scheme = "bearer"
|
||||||
|
});
|
||||||
|
var scheme = new OpenApiSecurityScheme()
|
||||||
|
{
|
||||||
|
Reference = new OpenApiReference() { Type = ReferenceType.SecurityScheme, Id = "JwtBearer" }
|
||||||
|
};
|
||||||
|
options.AddSecurityRequirement(new OpenApiSecurityRequirement()
|
||||||
|
{
|
||||||
|
[scheme] = new string[0]
|
||||||
|
});
|
||||||
|
|
||||||
|
options.OperationFilter<AddRequiredHeaderParameter>();
|
||||||
|
options.SchemaFilter<EnumSchemaFilter>();
|
||||||
}
|
}
|
||||||
|
);
|
||||||
|
|
||||||
options.AddSecurityDefinition("JwtBearer", new OpenApiSecurityScheme()
|
|
||||||
{
|
|
||||||
Description = "直接输入Token即可",
|
|
||||||
Name = "Authorization",
|
|
||||||
In = ParameterLocation.Header,
|
|
||||||
Type = SecuritySchemeType.Http,
|
|
||||||
Scheme = "bearer"
|
|
||||||
});
|
|
||||||
var scheme = new OpenApiSecurityScheme()
|
|
||||||
{
|
|
||||||
Reference = new OpenApiReference() { Type = ReferenceType.SecurityScheme, Id = "JwtBearer" }
|
|
||||||
};
|
|
||||||
options.AddSecurityRequirement(new OpenApiSecurityRequirement()
|
|
||||||
{
|
|
||||||
[scheme] = new string[0]
|
|
||||||
});
|
|
||||||
|
|
||||||
options.OperationFilter<AddRequiredHeaderParameter>();
|
|
||||||
options.SchemaFilter<EnumSchemaFilter>();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
@@ -103,7 +108,6 @@ namespace Yi.Framework.AspNetCore.Microsoft.Extensions.DependencyInjection
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="model"></param>
|
/// <param name="model"></param>
|
||||||
/// <param name="context"></param>
|
/// <param name="context"></param>
|
||||||
|
|
||||||
public void Apply(OpenApiSchema model, SchemaFilterContext context)
|
public void Apply(OpenApiSchema model, SchemaFilterContext context)
|
||||||
{
|
{
|
||||||
if (context.Type.IsEnum)
|
if (context.Type.IsEnum)
|
||||||
@@ -112,7 +116,7 @@ namespace Yi.Framework.AspNetCore.Microsoft.Extensions.DependencyInjection
|
|||||||
model.Type = "string";
|
model.Type = "string";
|
||||||
model.Format = null;
|
model.Format = null;
|
||||||
|
|
||||||
|
|
||||||
StringBuilder stringBuilder = new StringBuilder();
|
StringBuilder stringBuilder = new StringBuilder();
|
||||||
Enum.GetNames(context.Type)
|
Enum.GetNames(context.Type)
|
||||||
.ToList()
|
.ToList()
|
||||||
@@ -121,9 +125,10 @@ namespace Yi.Framework.AspNetCore.Microsoft.Extensions.DependencyInjection
|
|||||||
Enum e = (Enum)Enum.Parse(context.Type, name);
|
Enum e = (Enum)Enum.Parse(context.Type, name);
|
||||||
var descrptionOrNull = GetEnumDescription(e);
|
var descrptionOrNull = GetEnumDescription(e);
|
||||||
model.Enum.Add(new OpenApiString(name));
|
model.Enum.Add(new OpenApiString(name));
|
||||||
stringBuilder.Append($"【枚举:{name}{(descrptionOrNull is null ? string.Empty : $"({descrptionOrNull})")}={Convert.ToInt64(Enum.Parse(context.Type, name))}】<br />");
|
stringBuilder.Append(
|
||||||
|
$"【枚举:{name}{(descrptionOrNull is null ? string.Empty : $"({descrptionOrNull})")}={Convert.ToInt64(Enum.Parse(context.Type, name))}】<br />");
|
||||||
});
|
});
|
||||||
model.Description= stringBuilder.ToString();
|
model.Description = stringBuilder.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,13 +138,13 @@ namespace Yi.Framework.AspNetCore.Microsoft.Extensions.DependencyInjection
|
|||||||
var attributes = (DescriptionAttribute[])fieldInfo.GetCustomAttributes(typeof(DescriptionAttribute), false);
|
var attributes = (DescriptionAttribute[])fieldInfo.GetCustomAttributes(typeof(DescriptionAttribute), false);
|
||||||
return attributes.Length > 0 ? attributes[0].Description : null;
|
return attributes.Length > 0 ? attributes[0].Description : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class AddRequiredHeaderParameter : IOperationFilter
|
public class AddRequiredHeaderParameter : IOperationFilter
|
||||||
{
|
{
|
||||||
public static string HeaderKey { get; set; } = "__tenant";
|
public static string HeaderKey { get; set; } = "__tenant";
|
||||||
|
|
||||||
public void Apply(OpenApiOperation operation, OperationFilterContext context)
|
public void Apply(OpenApiOperation operation, OperationFilterContext context)
|
||||||
{
|
{
|
||||||
if (operation.Parameters == null)
|
if (operation.Parameters == null)
|
||||||
@@ -150,8 +155,8 @@ namespace Yi.Framework.AspNetCore.Microsoft.Extensions.DependencyInjection
|
|||||||
In = ParameterLocation.Header,
|
In = ParameterLocation.Header,
|
||||||
Required = false,
|
Required = false,
|
||||||
AllowEmptyValue = true,
|
AllowEmptyValue = true,
|
||||||
Description="租户id或者租户名称(可空为默认租户)"
|
Description = "租户id或者租户名称(可空为默认租户)"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,8 +35,7 @@ namespace Yi.Framework.SqlSugarCore.Uow
|
|||||||
CurrentTenant = currentTenant;
|
CurrentTenant = currentTenant;
|
||||||
Logger = NullLogger<UnitOfWorkSqlsugarDbContextProvider<TDbContext>>.Instance;
|
Logger = NullLogger<UnitOfWorkSqlsugarDbContextProvider<TDbContext>>.Instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
//private static object _databaseApiLock = new object();
|
|
||||||
public virtual async Task<TDbContext> GetDbContextAsync()
|
public virtual async Task<TDbContext> GetDbContextAsync()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -48,19 +47,16 @@ namespace Yi.Framework.SqlSugarCore.Uow
|
|||||||
|
|
||||||
|
|
||||||
var unitOfWork = UnitOfWorkManager.Current;
|
var unitOfWork = UnitOfWorkManager.Current;
|
||||||
if (unitOfWork == null /*|| unitOfWork.Options.IsTransactional == false*/)
|
if (unitOfWork == null )
|
||||||
{
|
{
|
||||||
var dbContext = (TDbContext)ServiceProvider.GetRequiredService<ISqlSugarDbContext>();
|
//var dbContext = (TDbContext)ServiceProvider.GetRequiredService<ISqlSugarDbContext>();
|
||||||
//提高体验,取消工作单元强制性
|
|
||||||
//throw new AbpException("A DbContext can only be created inside a unit of work!");
|
|
||||||
//如果不启用工作单元,创建一个新的db,不开启事务即可
|
//如果不启用工作单元,创建一个新的db,不开启事务即可
|
||||||
return dbContext;
|
//return dbContext;
|
||||||
|
|
||||||
|
//2024-11-30,改回强制性使用工作单元,否则容易造成歧义
|
||||||
|
throw new AbpException("DbContext 只能在工作单元内工作,当前DbContext没有工作单元,如需创建新线程并发操作,请手动创建工作单元");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//尝试当前工作单元获取db
|
//尝试当前工作单元获取db
|
||||||
var databaseApi = unitOfWork.FindDatabaseApi(dbContextKey);
|
var databaseApi = unitOfWork.FindDatabaseApi(dbContextKey);
|
||||||
|
|
||||||
|
|||||||
@@ -423,13 +423,13 @@ namespace Yi.Framework.Rbac.Application.Services
|
|||||||
{
|
{
|
||||||
//将后端菜单转换成前端路由,组件级别需要过滤
|
//将后端菜单转换成前端路由,组件级别需要过滤
|
||||||
output =
|
output =
|
||||||
ObjectMapper.Map<List<MenuDto>, List<MenuAggregateRoot>>(menus).Vue3RuoYiRouterBuild();
|
ObjectMapper.Map<List<MenuDto>, List<MenuAggregateRoot>>(menus.Where(x=>x.MenuSource==MenuSourceEnum.Ruoyi).ToList()).Vue3RuoYiRouterBuild();
|
||||||
}
|
}
|
||||||
else if (routerType == "pure")
|
else if (routerType == "pure")
|
||||||
{
|
{
|
||||||
//将后端菜单转换成前端路由,组件级别需要过滤
|
//将后端菜单转换成前端路由,组件级别需要过滤
|
||||||
output =
|
output =
|
||||||
ObjectMapper.Map<List<MenuDto>, List<MenuAggregateRoot>>(menus).Vue3PureRouterBuild();
|
ObjectMapper.Map<List<MenuDto>, List<MenuAggregateRoot>>(menus.Where(x=>x.MenuSource==MenuSourceEnum.Pure).ToList()).Vue3PureRouterBuild();
|
||||||
}
|
}
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ namespace Yi.Framework.Rbac.Domain.Shared.Dtos
|
|||||||
public HashSet<RoleDto> Roles { get; set; } = new();
|
public HashSet<RoleDto> Roles { get; set; } = new();
|
||||||
public HashSet<MenuDto> Menus { get; set; } = new();
|
public HashSet<MenuDto> Menus { get; set; } = new();
|
||||||
|
|
||||||
public List<string> RoleCodes { get; set; } = new();
|
public HashSet<string> RoleCodes { get; set; } = new();
|
||||||
public List<string> PermissionCodes { get; set; } = new();
|
public HashSet<string> PermissionCodes { get; set; } = new();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UserDto
|
public class UserDto
|
||||||
|
|||||||
@@ -217,8 +217,8 @@ namespace Yi.Framework.Rbac.Domain.Managers
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dto.PermissionCodes?.ForEach(per => AddToClaim(claims, TokenTypeConst.Permission, per));
|
dto.PermissionCodes?.ToList()?.ForEach(per => AddToClaim(claims, TokenTypeConst.Permission, per));
|
||||||
dto.RoleCodes?.ForEach(role => AddToClaim(claims, AbpClaimTypes.Role, role));
|
dto.RoleCodes?.ToList()?.ForEach(role => AddToClaim(claims, AbpClaimTypes.Role, role));
|
||||||
}
|
}
|
||||||
|
|
||||||
return claims;
|
return claims;
|
||||||
|
|||||||
@@ -67,7 +67,8 @@ namespace Yi.Abp.Application.Services
|
|||||||
public async Task GetUowAsync()
|
public async Task GetUowAsync()
|
||||||
{
|
{
|
||||||
//魔改
|
//魔改
|
||||||
// 用户体验优先,万金油模式,支持高并发。支持单、多线程并发安全,支持多线程工作单元,支持多线程无工作单元,支持。。。
|
// 用户体验优先,万金油模式,支持高并发。支持单、多线程并发安全,支持多线程工作单元,支持。。。
|
||||||
|
// 不支持多线程无工作单元,应由工作单元统一管理(来自abp工作单元设计)
|
||||||
// 请注意,如果requiresNew: true只有在没有工作单元内使用,嵌套子工作单元,默认值false即可
|
// 请注意,如果requiresNew: true只有在没有工作单元内使用,嵌套子工作单元,默认值false即可
|
||||||
// 自动在各个情况处理db客户端最优解之一
|
// 自动在各个情况处理db客户端最优解之一
|
||||||
int i = 3;
|
int i = 3;
|
||||||
@@ -78,7 +79,8 @@ namespace Yi.Abp.Application.Services
|
|||||||
{
|
{
|
||||||
tasks.Add(Task.Run(async () =>
|
tasks.Add(Task.Run(async () =>
|
||||||
{
|
{
|
||||||
await sqlSugarRepository.InsertAsync(new BannerAggregateRoot { Name = "插入2" });
|
//以下操作是错误的,不允许在新线程中,直接操作db,所有db操作应放在工作单元内,应由工作单元统一管理-来自abp工作单元设计
|
||||||
|
//await sqlSugarRepository.InsertAsync(new BannerAggregateRoot { Name = "插入2" });
|
||||||
using (var uow = UnitOfWorkManager.Begin(requiresNew: true, isTransactional: true))
|
using (var uow = UnitOfWorkManager.Begin(requiresNew: true, isTransactional: true))
|
||||||
{
|
{
|
||||||
await sqlSugarRepository.InsertAsync(new BannerAggregateRoot { Name = "插入1" });
|
await sqlSugarRepository.InsertAsync(new BannerAggregateRoot { Name = "插入1" });
|
||||||
|
|||||||
@@ -72,6 +72,30 @@ namespace Yi.Abp.Web
|
|||||||
{
|
{
|
||||||
private const string DefaultCorsPolicyName = "Default";
|
private const string DefaultCorsPolicyName = "Default";
|
||||||
|
|
||||||
|
public override void PreConfigureServices(ServiceConfigurationContext context)
|
||||||
|
{
|
||||||
|
//动态Api-改进在pre中配置,启动更快
|
||||||
|
PreConfigure<AbpAspNetCoreMvcOptions>(options =>
|
||||||
|
{
|
||||||
|
options.ConventionalControllers.Create(typeof(YiAbpApplicationModule).Assembly,
|
||||||
|
options => options.RemoteServiceName = "default");
|
||||||
|
options.ConventionalControllers.Create(typeof(YiFrameworkRbacApplicationModule).Assembly,
|
||||||
|
options => options.RemoteServiceName = "rbac");
|
||||||
|
options.ConventionalControllers.Create(typeof(YiFrameworkBbsApplicationModule).Assembly,
|
||||||
|
options => options.RemoteServiceName = "bbs");
|
||||||
|
options.ConventionalControllers.Create(typeof(YiFrameworkChatHubApplicationModule).Assembly,
|
||||||
|
options => options.RemoteServiceName = "chat-hub");
|
||||||
|
options.ConventionalControllers.Create(
|
||||||
|
typeof(YiFrameworkTenantManagementApplicationModule).Assembly,
|
||||||
|
options => options.RemoteServiceName = "tenant-management");
|
||||||
|
options.ConventionalControllers.Create(typeof(YiFrameworkCodeGenApplicationModule).Assembly,
|
||||||
|
options => options.RemoteServiceName = "code-gen");
|
||||||
|
|
||||||
|
//统一前缀
|
||||||
|
options.ConventionalControllers.ConventionalControllerSettings.ForEach(x => x.RootPath = "api/app");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public override Task ConfigureServicesAsync(ServiceConfigurationContext context)
|
public override Task ConfigureServicesAsync(ServiceConfigurationContext context)
|
||||||
{
|
{
|
||||||
var configuration = context.Services.GetConfiguration();
|
var configuration = context.Services.GetConfiguration();
|
||||||
@@ -97,6 +121,7 @@ namespace Yi.Abp.Web
|
|||||||
|
|
||||||
//配置错误处理显示详情
|
//配置错误处理显示详情
|
||||||
Configure<AbpExceptionHandlingOptions>(options => { options.SendExceptionsDetailsToClients = true; });
|
Configure<AbpExceptionHandlingOptions>(options => { options.SendExceptionsDetailsToClients = true; });
|
||||||
|
|
||||||
|
|
||||||
//动态Api
|
//动态Api
|
||||||
Configure<AbpAspNetCoreMvcOptions>(options =>
|
Configure<AbpAspNetCoreMvcOptions>(options =>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ namespace Yi.Abp.Tool.Commands
|
|||||||
{
|
{
|
||||||
application.OnExecute(() =>
|
application.OnExecute(() =>
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("正在克隆,请耐心等待");
|
||||||
StartCmd($"git clone {CloneAddress}");
|
StartCmd($"git clone {CloneAddress}");
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -36,6 +36,9 @@ namespace Yi.Abp.Tool.Commands
|
|||||||
var soureOption = application.Option("-s|--soure", "模板来源,gitee模板库分支名称: 默认值`default`",
|
var soureOption = application.Option("-s|--soure", "模板来源,gitee模板库分支名称: 默认值`default`",
|
||||||
CommandOptionType.SingleValue);
|
CommandOptionType.SingleValue);
|
||||||
|
|
||||||
|
var dbmsOption = application.Option("-dbms|--dataBaseMs", "数据库类型,支持目前主流数据库",
|
||||||
|
CommandOptionType.SingleValue);
|
||||||
|
|
||||||
var moduleNameArgument = application.Argument("moduleName", "模块名", (_) => { });
|
var moduleNameArgument = application.Argument("moduleName", "模块名", (_) => { });
|
||||||
|
|
||||||
//子命令,new list
|
//子命令,new list
|
||||||
@@ -58,6 +61,11 @@ namespace Yi.Abp.Tool.Commands
|
|||||||
|
|
||||||
application.OnExecute(() =>
|
application.OnExecute(() =>
|
||||||
{
|
{
|
||||||
|
if (dbmsOption.HasValue())
|
||||||
|
{
|
||||||
|
Console.WriteLine($"检测到使用数据库类型-{dbmsOption.Value()},请在生成后,只需在配置文件中,更改DbConnOptions:Url及DbType即可,支持目前主流数据库20+");
|
||||||
|
}
|
||||||
|
|
||||||
var path = string.Empty;
|
var path = string.Empty;
|
||||||
if (pathOption.HasValue())
|
if (pathOption.HasValue())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<Version>2.0.4</Version>
|
<Version>2.0.5</Version>
|
||||||
<Authors>橙子老哥</Authors>
|
<Authors>橙子老哥</Authors>
|
||||||
<Description>yi-framework框架配套工具</Description>
|
<Description>yi-framework框架配套工具</Description>
|
||||||
<PackageProjectUrl>https://ccnetcore.com</PackageProjectUrl>
|
<PackageProjectUrl>https://ccnetcore.com</PackageProjectUrl>
|
||||||
|
|||||||
Reference in New Issue
Block a user