All Projects → VictorTzeng → Zxw.framework.netcore

VictorTzeng / Zxw.framework.netcore

Licence: mit
基于EF Core的Code First模式的DotNetCore快速开发框架,其中包括DBContext、IOC组件autofac和AspectCore.Injector、代码生成器(也支持DB First)、基于AspectCore的memcache和Redis缓存组件,以及基于ICanPay的支付库和一些日常用的方法和扩展,比如批量插入、更新、删除以及触发器支持,当然还有demo。欢迎提交各种建议、意见和pr~

Projects that are alternatives of or similar to Zxw.framework.netcore

Smartsql
SmartSql = MyBatis in C# + .NET Core+ Cache(Memory | Redis) + R/W Splitting + PropertyChangedTrack +Dynamic Repository + InvokeSync + Diagnostics
Stars: ✭ 775 (+12.16%)
Mutual labels:  oracle, mysql, redis, postgresql, sqlite, sqlserver, dotnetcore
Qxorm
QxOrm library - C++ Qt ORM (Object Relational Mapping) and ODM (Object Document Mapper) library - Official repository
Stars: ✭ 176 (-74.53%)
Mutual labels:  oracle, mysql, mongodb, postgresql, sqlite, sqlserver
Kangaroo
SQL client and admin tool for popular databases
Stars: ✭ 127 (-81.62%)
Mutual labels:  oracle, mysql, redis, postgresql, sqlite, sqlserver
Endb
Key-value storage for multiple databases. Supports MongoDB, MySQL, Postgres, Redis, and SQLite.
Stars: ✭ 208 (-69.9%)
Mutual labels:  mysql, redis, mongodb, postgresql, sqlite
Chloe
A lightweight and high-performance Object/Relational Mapping(ORM) library for .NET --C#
Stars: ✭ 1,248 (+80.61%)
Mutual labels:  oracle, mysql, postgresql, sqlite, dotnetcore
Dotnetguide
🦸【C#/.NET/.NET Core学习、工作、面试指南】概述:C#/.NET/.NET Core基础知识,学习资料、文章、书籍,社区组织,工具和常见的面试题总结。以及面试时需要注意的事项和优秀简历编写技巧,希望能和大家一起成长进步👊。【让现在的自己不再迷漫✨】
Stars: ✭ 308 (-55.43%)
Mutual labels:  oracle, mysql, redis, mongodb, memcached
Netkiller.github.io
Netkiller Free ebook - 免费电子书
Stars: ✭ 861 (+24.6%)
Mutual labels:  mysql, redis, mongodb, postgresql, memcached
Adminer Custom
Customizations for Adminer, the best database management tool written in PHP.
Stars: ✭ 99 (-85.67%)
Mutual labels:  oracle, mysql, mongodb, postgresql, sqlite
Servicestack.ormlite
Fast, Simple, Typed ORM for .NET
Stars: ✭ 1,532 (+121.71%)
Mutual labels:  oracle, mysql, postgresql, sqlite, sqlserver
Koolreport
This is an Open Source PHP Reporting Framework which you can use to write perfect data reports or to construct awesome dashboards using PHP
Stars: ✭ 204 (-70.48%)
Mutual labels:  oracle, mysql, mongodb, postgresql, sqlserver
Jooq
jOOQ is the best way to write SQL in Java
Stars: ✭ 4,695 (+579.45%)
Mutual labels:  oracle, mysql, postgresql, sqlserver, code-generator
Xo
Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server
Stars: ✭ 2,974 (+330.39%)
Mutual labels:  oracle, mysql, postgresql, sqlite, code-generator
Freesql
🦄 .NET orm, Mysql orm, Postgresql orm, SqlServer orm, Oracle orm, Sqlite orm, Firebird orm, 达梦 orm, 人大金仓 orm, 神通 orm, 翰高 orm, 南大通用 orm, Click house orm, MsAccess orm.
Stars: ✭ 3,077 (+345.3%)
Mutual labels:  oracle, mysql, postgresql, sqlite, sqlserver
Typeorm
ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
Stars: ✭ 26,559 (+3743.56%)
Mutual labels:  oracle, mysql, postgresql, sqlite, sqlserver
Yiigo
🔥 Go 轻量级开发通用库 🚀🚀🚀
Stars: ✭ 304 (-56.01%)
Mutual labels:  mysql, redis, mongodb, postgresql
Node Orm2
Object Relational Mapping
Stars: ✭ 3,063 (+343.27%)
Mutual labels:  mysql, mongodb, postgresql, sqlite
Dev Setup
macOS development environment setup: Easy-to-understand instructions with automated setup scripts for developer tools like Vim, Sublime Text, Bash, iTerm, Python data analysis, Spark, Hadoop MapReduce, AWS, Heroku, JavaScript web development, Android development, common data stores, and dev-based OS X defaults.
Stars: ✭ 5,590 (+708.97%)
Mutual labels:  mysql, redis, mongodb, postgresql
Jsqlparser
JSqlParser parses an SQL statement and translate it into a hierarchy of Java classes. The generated hierarchy can be navigated using the Visitor Pattern
Stars: ✭ 3,405 (+392.76%)
Mutual labels:  oracle, mysql, postgresql, sqlserver
Gokv
Simple key-value store abstraction and implementations for Go (Redis, Consul, etcd, bbolt, BadgerDB, LevelDB, Memcached, DynamoDB, S3, PostgreSQL, MongoDB, CockroachDB and many more)
Stars: ✭ 314 (-54.56%)
Mutual labels:  redis, mongodb, postgresql, memcached
Dibi
Dibi - smart database abstraction layer
Stars: ✭ 373 (-46.02%)
Mutual labels:  mysql, postgresql, sqlite, sqlserver

Zxw.Framework.NetCore

Build Status

基于EF Core的Code First模式的DotNetCore快速开发框架

Nuget [最新版本:3.1.3.5]

Zxw.Framework.NetCore

  • Install-Package Zxw.Framework.NetCore -Version 3.1.3.5
  • dotnet add package Zxw.Framework.NetCore --version 3.1.3.5

开发环境

  • VS2019 / VS Code
  • .net core 3.1.100

支持的数据库

日志组件

  • log4net

DI组件

AOP缓存组件使用

本项目采用的AOP中间件 :AspectCore.Extensions.Cache

示例

.net framework版本地址

项目说明

更新日志

2019/12/17

    1. 添加框架同一入口扩展方法 AddCoreX
services.AddCoreX(config=> { })
    1. AddCoreX方法里面默认开启注入实现了ISingletonDependency、IScopedDependency、ITransientDependency三种不同生命周期的类,以及AddHttpContextAccessor和AddDataProtection。如需要自动注入,只需要按需实现ISingletonDependency、IScopedDependency、ITransientDependency这三种生命周期接口即可。
    1. 添加会话上下文 WebContext
    1. 升级 AspectCore 至 2.0.0
    1. 示例 Zxw.Framework.NetCore.Demo 已同步更新。

2019/09/16

  • 1.更换Oracle for efcore驱动,使用Oracle官方驱动

2019/09/15

  • 1.重构AOP缓存,统一用CachedAttribute

2019/08/11

  • 1.重构代码生成器,分CodeFirst和DbFirst

a.启用代码生成器


//启用代码生成器
services.UseCodeGenerator(new CodeGeneratorOption());

b.使用代码生成器


//CodeFirst---根据model生成其他各层的代码
dbContext.CodeFirst().GenerateAll(ifExsitedCovered:true);

//DbFirst---根据现有数据表生成各层代码
dbCOntext.DbFirst().GenerateAll(ifExsitedCovered:true);

  • 2.添加对APIController的代码生成

2019/04/25

  • 1.修改缓存拦截器默认key格式为:{namespace}{class}{method}{参数值hashcode}
  • 2.缓存拦截器添加对Task<>类型的支持

2019/04/18

  • 1.删除触发器功能...
  • 2.实现多数据库上下文。用法:
    //注入数据库上下文
    services.AddDbContextFactory(factory =>
    {
        factory.AddDbContext<PostgreSQLDbContext>("db1", new DbContextOption(){ConnectionString = "User ID=postgres;Password=123456;Host=localhost;Port=5432;Database=ZxwPgDemo;Pooling=true;" });
        factory.AddDbContext<SqlServerDbContext>("db2", new DbContextOption() { ConnectionString = "" });
        factory.AddDbContext<MongoDbContext>("db3", new DbContextOption() { ConnectionString = "" });
    });


    //获取
    public class TestController
    {
        public IDbContextCore DbContext1 { get; set; }
        public IDbContextCore DbContext2 { get; set; }
        public IDbContextCore DbContext3 { get; set; }

        public TestController(DbContextFactory factory)
        {
            DbContext1 = factory.GetDbContext("db1");
            DbContext2 = factory.GetDbContext("db2");
            DbContext3 = factory.GetDbContext("db3");
        }

        public void Run()
        {
            var db = DbContext1.GetDatabase();
            Console.WriteLine();
        }
    }
  • 3.多数据库上下文支持属性注入,用法如下:(具体请参考单元测试)
public class TestRepository: BaseRepository<MongoModel, ObjectId>, IMongoRepository
    {
        [FromDbContextFactory("db1")]
        public IDbContextCore DbContext1 { get; set; }
        [FromDbContextFactory("db2")]
        public IDbContextCore DbContext2 { get; set; }
        [FromDbContextFactory("db3")]
        public IDbContextCore DbContext3 { get; set; }



        public void Run()
        {
            Console.WriteLine("Over!");
        }

        public TestRepository(IDbContextCore dbContext) : base(dbContext)
        {
        }
    }

2018/09/24

2018/08/26

  • 1.添加自定义视图分页查询,数据库分页,目前只支持sqlserver
  • 2.update packages

2018/07/06 合并dev分支到master

  • 1.添加EFCore直接返回DataTable功能
  • 2.DBFirst功能,目前仅支持SQL Server、MySQL、NpgSQL三种数据库。根据已存在的数据表直接生成实体代码,详见CodeGenerator
  • 3.添加单元测试项目,并完成对以上两点新功能的测试
  • 4.引入IOC容器Aspectcore.Injector,详见AspectCoreContainer.cs

开源协议

  • 本开源项目遵守MIT开源协议,请保留原作者出处。
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].