Git Product home page Git Product logo

ctrl.framework's Introduction

Ctrl.Framework

Build Status LICENSE language

在线预览地址:http://abp.stackable.cn/

服务器配置

系统 CPU 内存
CentOS 7 1核 2G

前言

ASP.NET Core3.1、AbpvNext、BootStrap进行构建的快速开发通用型基础开发框架.

目前该框架正在从我前几年写的一个.NETCore快速开发框架中一点点向AbpvNext中迁移,本框架将打造一个AbpvNext快速开发框架。

同时该框架目前正在编码中,同时希望可以有更多的小伙伴一起参与进来.

项目介绍

Ctrl.Framework将打造一个简单快速适合中小型企业的快速开发框架

使用

通过CtrlCloud.Framework.EntityFrameworkCore.DbMigrations,修改appsettings.json中连接字符串执行如下命令附加数据库

Add-Migration InitCreate

Update-Database

本框架默认为MySQL数据库如果您有其他数据库需求那么您可以从如下代码中进行修改

  public class CtrlMigrationsDbContextFactory : IDesignTimeDbContextFactory<CtrlMigrationsDbContext>
    {
        public CtrlMigrationsDbContext CreateDbContext(string[] args)
        {
            var configuration = BuildConfiguration();

            var builder = new DbContextOptionsBuilder<CtrlMigrationsDbContext>()
                .UseSqlServer(configuration.GetConnectionString("Test"));

            return new CtrlMigrationsDbContext(builder.Options);
        }
    }
    [DependsOn(typeof(AbpEntityFrameworkCoreSqlServerModule),
        typeof(AbpGuidsModule))]
    public class CtrlEntityFrameworkCoreModule:AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            context.Services.AddAbpDbContext<CtrlDbContext>(options =>
            {
                /* Remove "includeAllEntities: true" to create
                 * default repositories only for aggregate roots */
                options.AddDefaultRepositories(includeAllEntities: true);
            });

            Configure<AbpDbContextOptions>(options =>
            {
                options.UseSqlServer();
            });
        }
    }

代码贡献

如果您有想法可以加入我们,或者发现本项目中需要改进的代码,欢迎 Fork 并提交 PR!

LICENSE

MIT

ctrl.framework's People

Contributors

hueifeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

hueifeng

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.