7 Star 77 Fork 28

1024 / Abc.Mvc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Abc.Mvc

Abc.Mvc 中有非常多的实用的功能,我抽时间搞个文档出来说明下

介绍

使用NET7,目前是RC1 Furion+EF+Sqlsugar+Pear Layui 的 MVC 后台管理框架

【ABC.MVC_Sqlsugar 版本】

https://gitee.com/co1024/abcmvc_sqlsugar

软件架构

软件架构说明

  • Abc.Base:框架基础设施/通用模块封装
  • Abc.Application:业务应用层(业务代码主要编写层)
  • Abc.Core:核心层(实体,仓储,其他核心代码)
  • Abc.EntityFramework.Migrations:EFCore 架构迁移文件层
  • Abc.Database.Core:EF、SqlSugar等 配置层
  • Abc.Web.Core:Web 核心层(存放 Web 公共代码,如 过滤器、中间件、Web Helpers 等)
  • Abc.Web.Mvc:Web 入口层/启动层
  • Abc.WorkerService:辅助角色服务,定时任务,多线程任务 等

安装教程

1.数据库默认使用 Sqlite,下载后,设置 Abc.Web.Mvc 为启动项 2.管理后台在 xxx/HtAdmin/Home/Index路径下 3. 默认登陆账号 Administrator 密码:admin123123

QQ频道:单击加入频道 频道号:9o576t0h0o

QQ群号:261182818

使用说明

系统截图

登陆页面 后台首页 系统设置 字典示例 用户列表

使用开发人员账号,可以打开开发工具 layui简单表单设计器 数据配置管理

系统设计了菜单自动生成模块,只要贴上相应的标签进入开发页面,点击一下按钮即可自动完成,省去了更新修改之后要去重新配置菜单的麻烦 开发设置 菜单列表

更换数据库说明

修改Abc.Database.Core 库中Configs文件中的dbsettings.json 文件

DbSetting.DbProvider ="你的数据库类别"

{
  "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
  "DbSetting": {
    "DbProvider": "Microsoft.EntityFrameworkCore.Sqlite" //这个是数据库类别
  },
  "ConnectionStrings": {
    "DbConnectionString": "Data Source=./Abc.db"
  },
  //SqlSugar的配置
  "SqlSugarDbSetting": {
    "SnowFlakeSingle_WorkId": 1, //sqlsugar的雪花ID
    "EntityIsIdentity": true, //实体数据库是否自增,注意: //数据库没有进行初始化的时候才设置为自增
    "DataBaseName": "Abc", //数据库名称
    "DatabaseDirectory": "", //数据库创建路径
    "EnableInitDatabase": false, // 启用初始化数据库
    "IsRecordExecSql": true, //是否记录执行sql
    "EnableDiffLog": true, // 启用库表差异日志
    "NoIsIdentityDbTables": [], //主键不自增的数据库表名
    "ConnectionConfigs": [ // 默认第一个为主库
      {
        "ConfigId": "Abc",
        "DbType": "SqlServer", //SqlSugar 的数据库类型
        "ConnectionString": "Server=localhost;Database=Abc;User=sa;Password=123456;MultipleActiveResultSets=True;Encrypt=True;Trusted_Connection=True;TrustServerCertificate=True;",
        "IsAutoCloseConnection": true
      }
    ]
  }
}

数据库类别:如下:必须按furion内置的传

  • SqlServer:Microsoft.EntityFrameworkCore.SqlServer (支持 SqlServer 2005 +)
  • Sqlite:Microsoft.EntityFrameworkCore.Sqlite
  • Cosmos:Microsoft.EntityFrameworkCore.Cosmos
  • InMemoryDatabase:Microsoft.EntityFrameworkCore.InMemory
  • MySql Pomelo.EntityFrameworkCore.MySql:(支持 MySql 5.x +) MySql.EntityFrameworkCore:支持 (MySql 8.x +)
  • PostgreSQL:Npgsql.EntityFrameworkCore.PostgreSQL
  • Oracle:Oracle.EntityFrameworkCore (支持 Oracle 10 +)
  • Firebird:FirebirdSql.EntityFrameworkCore.Firebird
  • Dm:Microsoft.EntityFrameworkCore.Dm

** 各种数据库连接字符串写法:**

  • Sqlite:Data Source=./Furion.db
  • MySql:Data Source=localhost;Database=Furion;User ID=root;Password=000000;pooling=true;port=3306;sslmode=none;CharSet=utf8;
  • SqlServer:Server=localhost;Database=Furion;User=sa;Password=000000;MultipleActiveResultSets=True;
  • Oracle:User Id=orcl;Password=orcl;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl)))
  • PostgreSQL:PORT=5432;DATABASE=postgres;HOST=127.0.0.1;PASSWORD=postgres;USER ID=postgres;

数据库迁移

  • 如果更改了数据库提供器,默认使用的sqllite,就需要重新迁移代码
  • 操作步骤如下
  1. 删除Abc.EntityFramework.Migrations 目录下Migragions文件夹

  2. 重新迁移如下图: 输入图片说明 输入图片说明 生成迁移文件命令:add-migration init 更新到数据库:update-database

  3. EF相关设置可以参考 furion文档 furion入门设置

重新生成后台菜单

  • 首先登陆并进入后台:地址栏 /HtAdmin/Home/Index 修改为:/HtAdmin/developer/Index 进入如下界面
  • 目前此地方操作不太友好,后面会优化 输入图片说明

操作完成后返回后台首页即可

特技

  1. Furion地址 https://gitee.com/dotnetchina/Furion
  2. Pear Admin地址 https://gitee.com/pear-admin/Pear-Admin-Layui
  3. SqlSugar 地址 https://www.donet5.com/Home/Doc

Furion +EF+SqlSugar+Vue 项目地址:Abc.WebApi Furion +SqlSugar+pear admin layui 项目地址:Abc.Mvc_SqlSugar

注:系统中使用其它一些开源的代码,由于不记得到底是哪儿来的,可能没标记来源,如果有发现,可联系修改

MIT License Copyright (c) 2021 1024 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Furion+EF+Sqlsugar+Pear Layui 的 MVC 后台管理框架 展开 收起
C# 等 4 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C#
1
https://gitee.com/co1024/AbcMvc.git
git@gitee.com:co1024/AbcMvc.git
co1024
AbcMvc
Abc.Mvc
v2-NET8

搜索帮助

14c37bed 8189591 565d56ea 8189591