Git Product home page Git Product logo

zuohuaijun / admin.net Goto Github PK

View Code? Open in Web Editor NEW
100.0 5.0 38.0 30.13 MB

🔥基于.NET 8(Furion)/SqlSugar实现的通用管理平台。整合最新技术,模块插件式开发,前后端分离,开箱即用。集成多租户、缓存、数据校验、鉴权、事件总线、动态API、通讯、远程请求、任务调度、gRPC等众多黑科技。代码简洁、易扩展,让开发更简单、更通用、更流行!

License: MIT License

C# 24.78% Dockerfile 0.01% HTML 0.08% Shell 0.19% JavaScript 0.10% Vue 25.63% Batchfile 0.02% CSS 0.19% TypeScript 47.39% SCSS 1.61%
furion vue admin csharp dotnet dotnetcore swagger efcore fur net5

admin.net's Issues

好好宣传下

你这个名字起的不好找。好好宣传下 需要你这样的框架

dbProvider.CodeFirst.InitTables(entityType) 异常

生成表格时:使用的默认的数据库 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, Span1& 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, Action1 configure)
在 Furion.InternalApp.<>c.b__5_1(WebHostBuilderContext hostContext, IServiceCollection services)
在 Microsoft.AspNetCore.Builder.ConfigureWebHostBuilder.ConfigureServices(Action2 configureServices) 在 Furion.InternalApp.ConfigureApplication(IWebHostBuilder builder, IHostBuilder hostBuilder) 在 Microsoft.AspNetCore.Builder.AppWebApplicationBuilderExtensions.Inject(WebApplicationBuilder webApplicationBuilder, Action2 configure)
在 System.Serve.Run(RunOptions options, String urls)
在 Program.

$(String[] args) 在 D:\Project\Admin.NET\Admin.NET\Admin.NET.Web.Entry\Program.cs 中: 第 10 行

此异常最初是在此调用堆栈中引发的:
[外部代码]

内部异常 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();

if (config.ConfigId == SqlSugarConst.MainConfigId) // 默认库(有系统表特性、没有日志表和租户表特性)
    entityTypes = entityTypes.Where(u => u.GetCustomAttributes<SysTableAttribute>().Any() || (!u.GetCustomAttributes<LogTableAttribute>().Any() && !u.GetCustomAttributes<TenantAttribute>().Any())).ToList();
else if (config.ConfigId == SqlSugarConst.LogConfigId) // 日志库
    entityTypes = entityTypes.Where(u => u.GetCustomAttributes<LogTableAttribute>().Any()).ToList();
else
    entityTypes = entityTypes.Where(u => u.GetCustomAttribute<TenantAttribute>()?.configId.ToString() == config.ConfigId).ToList(); // 自定义的库

foreach (var entityType in entityTypes)
{
    if (entityType.GetCustomAttribute<SplitTableAttribute>() == null)
        dbProvider.CodeFirst.InitTables(entityType);
    else
        dbProvider.CodeFirst.SplitTables().InitTables(entityType);
}

}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.