🔥基于.NET 8(Furion)/SqlSugar实现的通用管理平台。整合最新技术,模块插件式开发,前后端分离,开箱即用。集成多租户、缓存、数据校验、鉴权、事件总线、动态API、通讯、远程请求、任务调度、gRPC等众多黑科技。代码简洁、易扩展,让开发更简单、更通用、更流行!
191
stars
65
forks
source link
dbProvider.CodeFirst.InitTables(entityType) 异常 #2
Closed
kindao1 closed 3 months ago
生成表格时:使用的默认的数据库 Sqlite dbProvider.CodeFirst.InitTables(entityType); entityType为SysCodeGenConfig 时 报错了
System.Reflection.TargetInvocationException HResult=0x80131604 Message=Exception has been thrown by the target of an invocation. Source=System.Private.CoreLib StackTrace: 在 System.RuntimeMethodHandle.InvokeMethod(Object target, Spanb__5_1(WebHostBuilderContext hostContext, IServiceCollection services)
在 Microsoft.AspNetCore.Builder.ConfigureWebHostBuilder.ConfigureServices(Action$(String[] args) 在 D:\Project\Admin.NET\Admin.NET\Admin.NET.Web.Entry\Program.cs 中: 第 10 行
1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) 在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 在 Microsoft.Extensions.DependencyInjection.AppServiceCollectionExtensions.AddStartups(IServiceCollection services) 在 Microsoft.Extensions.DependencyInjection.AppServiceCollectionExtensions.AddApp(IServiceCollection services, Action
1 configure) 在 Furion.InternalApp.<>c.2 configureServices) 在 Furion.InternalApp.ConfigureApplication(IWebHostBuilder builder, IHostBuilder hostBuilder) 在 Microsoft.AspNetCore.Builder.AppWebApplicationBuilderExtensions.Inject(WebApplicationBuilder webApplicationBuilder, Action
2 configure) 在 System.Serve.Run(RunOptions options, String urls) 在 Program.此异常最初是在此调用堆栈中引发的: [外部代码]
内部异常 1: InvalidOperationException: Method may only be called on a Type for which Type.IsGenericParameter is true.
if (config.TableSettings.EnableInitTable) { var entityTypes = App.EffectiveTypes.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass && u.IsDefined(typeof(SugarTable), false)) .WhereIF(config.TableSettings.EnableIncreTable, u => u.IsDefined(typeof(IncreTableAttribute), false)).ToList();
}