当前位置: 移动技术网 > IT编程>开发语言>.net > .NET Core实战项目之CMS 第十二章 开发篇-Dapper封装CURD及仓储代码生成器实现

.NET Core实战项目之CMS 第十二章 开发篇-Dapper封装CURD及仓储代码生成器实现

2018年12月20日  | 移动技术网IT编程  | 我要评论

竹蒂,3u8658,贵州整治特供酒

本篇我将带着大家一起来对dapper进行下封装并实现基本的增删改查、分页操作的同步异步方法的实现(已实现mssql,mysql,pgsql)。同时我们再实现一下仓储层的代码生成器,这样的话,我们只需要结合业务来实现具体的业务部分的代码就可以了,可以大大减少我们重复而又繁琐的增删改查操作,多留点时间给生活充充电(不会偷懒的程序员不是一位好爸爸/好老公/好男朋友)。如果您觉得我的实现过程有所不妥的话,您可以在评论区留言,或者加入我们的千人.net core实战项目交流群637326624交流。另外如果您觉得我的文章对您有所帮助的话希望给个推荐以示支持。项目的源代码我会托管在gayhub上,地址在文章末尾会给出,自认为代码写的很工整,注释也很全,你应该能看懂!

本文已收录至《.net core实战项目之cms 第一章 入门篇-开篇及总体规划

作者:依乐祝

原文地址:

写在前面

将近一周没有更新,鬼知道我这么长时间在干什么,你可以认为我在憋大招,在想着怎么给大家分享更多更实用的东西。其实这只是我偷懒的借口罢了!下面我们一起来对dapper进行下封装吧,然后结合dapper.simplecrud 来实现基本的增删改查、分页操作。这部分功能实现完成后,往下我们也就是基于这些基本操作来实现我们的cms的业务了,如:权限部分,菜单部分,文章部分的功能。接下来我会对这部分快速的实现,可能会很少更新了,因为这些都是基本的cms的业务操作,没多少要分享的内容,毕竟每个人的系统业务都不一样,这部分的业务实现也是千差万别的。我后期会把成品直接分享给大家!敬请关注吧!

dapper的封装

idbconnection工厂类的封装

这部分我实现了一个idbconnection的工厂类,以便你可以很方便的根据数据库的类型来创建不同的idbconnection对象,目前已实现对sqlserver,mysql,postgresql的实现,具体代码如下,根据传入的参数来进行相关的实现。

       /// <summary>
    /// yilezhu
    /// 2018.12.13
    /// 数据库连接工厂类
    /// </summary>
    public class connectionfactory
    {
        /// <summary>
        /// 获取数据库连接
        /// </summary>
        /// <param name="dbtype">数据库类型</param>
        /// <param name="constr">数据库连接字符串</param>
        /// <returns>数据库连接</returns>
        public static idbconnection createconnection(string dbtype, string strconn)
        {
            if (dbtype.isnullorwhitespace())
                throw new argumentnullexception("获取数据库连接居然不传数据库类型,你想上天吗?");
            if (strconn.isnullorwhitespace())
                throw new argumentnullexception("获取数据库连接居然不传数据库类型,你想上天吗?");
            var dbtype = getdatabasetype(dbtype);
            return createconnection(dbtype,strconn);
        }

        /// <summary>
        /// 获取数据库连接
        /// </summary>
        /// <param name="dbtype">数据库类型</param>
        /// <param name="constr">数据库连接字符串</param>
        /// <returns>数据库连接</returns>
        public static idbconnection createconnection(databasetype dbtype, string strconn)
        {
            idbconnection connection = null;           
            if (strconn.isnullorwhitespace())
                throw new argumentnullexception("获取数据库连接居然不传数据库类型,你想上天吗?");
            
            switch (dbtype)
            {
                case databasetype.sqlserver:
                    connection = new sqlconnection(strconn);
                    break;
                case databasetype.mysql:
                    connection = new mysqlconnection(strconn);
                    break;
                case databasetype.postgresql:
                    connection = new npgsqlconnection(strconn);
                    break;
                default:
                    throw new argumentnullexception($"这是我的错,还不支持的{dbtype.tostring()}数据库类型");

            }
            if (connection.state == connectionstate.closed)
            {
                connection.open();
            }
            return connection;
        }

        /// <summary>
        /// 转换数据库类型
        /// </summary>
        /// <param name="dbtype">数据库类型字符串</param>
        /// <returns>数据库类型</returns>
        public static databasetype getdatabasetype(string dbtype)
        {
            if (dbtype.isnullorwhitespace())
                throw new argumentnullexception("获取数据库连接居然不传数据库类型,你想上天吗?");
            databasetype returnvalue = databasetype.sqlserver;
            foreach (databasetype dbtype in enum.getvalues(typeof(databasetype)))
            {
                if (dbtype.tostring().equals(dbtype, stringcomparison.ordinalignorecase))
                {
                    returnvalue = dbtype;
                    break;
                }
            }
            return returnvalue;
        }

        
    }

那么,我们怎么来使用这个工厂类呢?如下给出调用的实例。

1545221995138

是不是很简单,感觉瞬间少了很多代码,这段代码摘录自代码生成器里面。有兴趣的自己去查看源码吧!

crud及分页泛型方法的实现

  1. nuget安装dapper.simplecrud ,什么你要问我怎么安装?乖乖的回去看第二篇文章吧!那里会教你如何安装nuget包?如果那篇文章里面没有,那你就好好想想为啥没有呢?

    1545222273003

  2. 新建ibaserepository泛型接口 定义如下的增删改查方法的同步异步接口,其中还包含分页的实现,具体的代码如下:

    /**
    *┌──────────────────────────────────────────────────────────────┐
    *│ 描    述:                                                    
    *│ 作    者:yilezhu                                             
    *│ 版    本:1.0                                                 
    *│ 创建时间:2018/12/16 20:41:22                             
    *└──────────────────────────────────────────────────────────────┘
    *┌──────────────────────────────────────────────────────────────┐
    *│ 命名空间: czar.cms.core.repository                                   
    *│ 接口名称: ibaserepository                                      
    *└──────────────────────────────────────────────────────────────┘
    */
    using system;
    using system.collections.generic;
    using system.data;
    using system.linq;
    using system.text;
    using system.threading.tasks;
    
    namespace czar.cms.core.repository
    {
        public interface ibaserepository<t,tkey> :  idisposable where t : class
        {
            #region 同步
            /// <summary>
            /// 通过主键获取实体对象
            /// </summary>
            /// <param name="id">主键id</param>
            /// <returns></returns>
            t get(tkey id);
            /// <summary>
            /// 获取所有的数据
            /// </summary>
            /// <returns></returns>
            ienumerable<t> getlist();
            /// <summary>
            /// 执行具有条件的查询,并将结果映射到强类型列表
            /// </summary>
            /// <param name="whereconditions">条件</param>
            /// <returns></returns>
            ienumerable<t> getlist(object whereconditions);
            /// <summary>
            /// 带参数的查询满足条件的数据
            /// </summary>
            /// <param name="conditions">条件</param>
            /// <param name="parameters">参数</param>
            /// <returns></returns>
            ienumerable<t> getlist(string conditions, object parameters = null);
            /// <summary>
            /// 使用where子句执行查询,并将结果映射到具有paging的强类型list
            /// </summary>
            /// <param name="pagenumber">页码</param>
            /// <param name="rowsperpage">每页显示数据</param>
            /// <param name="conditions">查询条件</param>
            /// <param name="orderby">排序</param>
            /// <param name="parameters">参数</param>
            /// <returns></returns>
            ienumerable<t> getlistpaged(int pagenumber, int rowsperpage, string conditions, string orderby, object parameters = null);
            /// <summary>
            /// 插入一条记录并返回主键值(自增类型返回主键值,否则返回null)
            /// </summary>
            /// <param name="entity"></param>
            /// <returns></returns>
            int? insert(t entity);
            /// <summary>
            /// 更新一条数据并返回影响的行数
            /// </summary>
            /// <param name="entity"></param>
            /// <returns>影响的行数</returns>
            int update(t entity);
            /// <summary>
            /// 根据实体主键删除一条数据
            /// </summary>
            /// <param name="id">主键</param>
            /// <returns>影响的行数</returns>
            int delete(tkey id);
            /// <summary>
            /// 根据实体删除一条数据
            /// </summary>
            /// <param name="entity">实体</param>
            /// <returns>返回影响的行数</returns>
            int delete(t entity);
            /// <summary>
            /// 条件删除多条记录
            /// </summary>
            /// <param name="whereconditions">条件</param>
            /// <param name="transaction">事务</param>
            /// <param name="commandtimeout">超时时间</param>
            /// <returns>影响的行数</returns>
            int deletelist(object whereconditions, idbtransaction transaction = null, int? commandtimeout = null);
            /// <summary>
            /// 使用where子句删除多个记录
            /// </summary>
            /// <param name="conditions">wher子句</param>
            /// <param name="parameters">参数</param>
            /// <param name="transaction">事务</param>
            /// <param name="commandtimeout">超时时间</param>
            /// <returns>影响的行数</returns>
            int deletelist(string conditions, object parameters = null, idbtransaction transaction = null, int? commandtimeout = null);
            /// <summary>
            /// 满足条件的记录数量
            /// </summary>
            /// <param name="conditions"></param>
            /// <param name="parameters"></param>
            /// <returns></returns>
            int recordcount(string conditions = "", object parameters = null);
            #endregion
            #region 异步
            /// <summary>
            /// 通过主键获取实体对象
            /// </summary>
            /// <param name="id">主键id</param>
            /// <returns></returns>
            task<t> getasync(tkey id);
            /// <summary>
            /// 获取所有的数据
            /// </summary>
            /// <returns></returns>
            task<ienumerable<t>> getlistasync();
            /// <summary>
            /// 执行具有条件的查询,并将结果映射到强类型列表
            /// </summary>
            /// <param name="whereconditions">条件</param>
            /// <returns></returns>
            task<ienumerable<t>> getlistasync(object whereconditions);
            /// <summary>
            /// 带参数的查询满足条件的数据
            /// </summary>
            /// <param name="conditions">条件</param>
            /// <param name="parameters">参数</param>
            /// <returns></returns>
            task<ienumerable<t>> getlistasync(string conditions, object parameters = null);
            /// <summary>
            /// 使用where子句执行查询,并将结果映射到具有paging的强类型list
            /// </summary>
            /// <param name="pagenumber">页码</param>
            /// <param name="rowsperpage">每页显示数据</param>
            /// <param name="conditions">查询条件</param>
            /// <param name="orderby">排序</param>
            /// <param name="parameters">参数</param>
            /// <returns></returns>
            task<ienumerable<t>> getlistpagedasync(int pagenumber, int rowsperpage, string conditions, string orderby, object parameters = null);
            /// <summary>
            /// 插入一条记录并返回主键值
            /// </summary>
            /// <param name="entity"></param>
            /// <returns></returns>
            task<int?> insertasync(t entity);
            /// <summary>
            /// 更新一条数据并返回影响的行数
            /// </summary>
            /// <param name="entity"></param>
            /// <returns>影响的行数</returns>
            task<int> updateasync(t entity);
            /// <summary>
            /// 根据实体主键删除一条数据
            /// </summary>
            /// <param name="id">主键</param>
            /// <returns>影响的行数</returns>
            task<int> deleteasync(tkey id);
            /// <summary>
            /// 根据实体删除一条数据
            /// </summary>
            /// <param name="entity">实体</param>
            /// <returns>返回影响的行数</returns>
            task<int> deleteasync(t entity);
            /// <summary>
            /// 条件删除多条记录
            /// </summary>
            /// <param name="whereconditions">条件</param>
            /// <param name="transaction">事务</param>
            /// <param name="commandtimeout">超时时间</param>
            /// <returns>影响的行数</returns>
            task<int> deletelistasync(object whereconditions, idbtransaction transaction = null, int? commandtimeout = null);
            /// <summary>
            /// 使用where子句删除多个记录
            /// </summary>
            /// <param name="conditions">wher子句</param>
            /// <param name="parameters">参数</param>
            /// <param name="transaction">事务</param>
            /// <param name="commandtimeout">超时时间</param>
            /// <returns>影响的行数</returns>
            task<int> deletelistasync(string conditions, object parameters = null, idbtransaction transaction = null, int? commandtimeout = null);
            /// <summary>
            /// 满足条件的记录数量
            /// </summary>
            /// <param name="conditions"></param>
            /// <param name="parameters"></param>
            /// <returns></returns>
            task<int> recordcountasync(string conditions = "", object parameters = null);
            #endregion
        }
    }
    
  3. 然后创建一个baserepository泛型类来实现上面的接口,其中多了两个成员,dbopion以及idbconnection,猜猜看这两个东西有什么用?后面给出答案

    /**
    *┌──────────────────────────────────────────────────────────────┐
    *│ 描    述:仓储类的基类                                                    
    *│ 作    者:yilezhu                                             
    *│ 版    本:1.0                                                 
    *│ 创建时间:2018/12/16 12:03:02                             
    *└──────────────────────────────────────────────────────────────┘
    *┌──────────────────────────────────────────────────────────────┐
    *│ 命名空间: czar.cms.core.repository                                   
    *│ 类    名: baserepository                                      
    *└──────────────────────────────────────────────────────────────┘
    */
    using czar.cms.core.dbhelper;
    using czar.cms.core.options;
    using system;
    using system.collections;
    using system.collections.generic;
    using system.data;
    using system.linq;
    using system.linq.expressions;
    using system.text;
    using system.threading.tasks;
    using dapper;
    
    namespace czar.cms.core.repository
    {
        public class baserepository<t, tkey> : ibaserepository<t, tkey> where t : class
        {
            protected dbopion _dbopion;
            protected idbconnection _dbconnection;
    
            //public baserepository(dbopion dbopion)
            //{
            //    _dbopion = dbopion ?? throw new argumentnullexception(nameof(dbopion));
            //    _dbconnection = connectionfactory.createconnection(_dbopion.dbtype, _dbopion.connectionstring);
            //}
    
            #region 同步
    
            public t get(tkey id) => _dbconnection.get<t>(id);
            public ienumerable<t> getlist() => _dbconnection.getlist<t>();
    
            public ienumerable<t> getlist(object whereconditions) => _dbconnection.getlist<t>(whereconditions);
    
            public ienumerable<t> getlist(string conditions, object parameters = null) => _dbconnection.getlist<t>(conditions, parameters);
    
            public ienumerable<t> getlistpaged(int pagenumber, int rowsperpage, string conditions, string orderby, object parameters = null)
            {
                return _dbconnection.getlistpaged<t>(pagenumber, rowsperpage, conditions, orderby, parameters);
            }
            public int? insert(t entity) => _dbconnection.insert(entity);
            public int update(t entity) => _dbconnection.update(entity);
    
            public int delete(tkey id) => _dbconnection.delete<t>(id);
    
            public int delete(t entity) => _dbconnection.delete(entity);
            public int deletelist(object whereconditions, idbtransaction transaction = null, int? commandtimeout = null)
            {
                return _dbconnection.deletelist<t>(whereconditions, transaction, commandtimeout);
            }
    
            public int deletelist(string conditions, object parameters = null, idbtransaction transaction = null, int? commandtimeout = null)
            {
                return _dbconnection.deletelist<t>(conditions, parameters, transaction, commandtimeout);
            }
            public int recordcount(string conditions = "", object parameters = null)
            {
                return _dbconnection.recordcount<t>(conditions, parameters);
            }
            #endregion
    
            #region 异步
            public async task<t> getasync(tkey id)
            {
                return await _dbconnection.getasync<t>(id);
            }
    
            public async task<ienumerable<t>> getlistasync()
            {
                return await _dbconnection.getlistasync<t>();
            }
    
            public async task<ienumerable<t>> getlistasync(object whereconditions)
            {
                return await _dbconnection.getlistasync<t>(whereconditions);
            }
    
            public async task<ienumerable<t>> getlistasync(string conditions, object parameters = null)
            {
                return await _dbconnection.getlistasync<t>(conditions, parameters);
            }
            public async task<ienumerable<t>> getlistpagedasync(int pagenumber, int rowsperpage, string conditions, string orderby, object parameters = null)
            {
                return await _dbconnection.getlistpagedasync<t>(pagenumber, rowsperpage, conditions, orderby, parameters);
            }
            public async task<int?> insertasync(t entity)
            {
                return await _dbconnection.insertasync(entity);
            }
            public async task<int> updateasync(t entity)
            {
                return await _dbconnection.updateasync(entity);
            }
            public async task<int> deleteasync(tkey id)
            {
                return await _dbconnection.deleteasync(id);
            }
    
            public async task<int> deleteasync(t entity)
            {
                return await _dbconnection.deleteasync(entity);
            }
    
    
            public async task<int> deletelistasync(object whereconditions, idbtransaction transaction = null, int? commandtimeout = null)
            {
                return await _dbconnection.deletelistasync<t>(whereconditions, transaction, commandtimeout);
            }
    
            public async task<int> deletelistasync(string conditions, object parameters = null, idbtransaction transaction = null, int? commandtimeout = null)
            {
                return await deletelistasync(conditions, parameters, transaction, commandtimeout);
            }
            public async task<int> recordcountasync(string conditions = "", object parameters = null)
            {
                return await _dbconnection.recordcountasync<t>(conditions, parameters);
            }
            #endregion
    
            #region idisposable support
            private bool disposedvalue = false; // 要检测冗余调用
    
            protected virtual void dispose(bool disposing)
            {
                if (!disposedvalue)
                {
                    if (disposing)
                    {
                        // todo: 释放托管状态(托管对象)。
                    }
    
                    // todo: 释放未托管的资源(未托管的对象)并在以下内容中替代终结器。
                    // todo: 将大型字段设置为 null。
    
                    disposedvalue = true;
                }
            }
    
            // todo: 仅当以上 dispose(bool disposing) 拥有用于释放未托管资源的代码时才替代终结器。
            // ~baserepository() {
            //   // 请勿更改此代码。将清理代码放入以上 dispose(bool disposing) 中。
            //   dispose(false);
            // }
    
            // 添加此代码以正确实现可处置模式。
            public void dispose()
            {
                // 请勿更改此代码。将清理代码放入以上 dispose(bool disposing) 中。
                dispose(true);
                // todo: 如果在以上内容中替代了终结器,则取消注释以下行。
                // gc.suppressfinalize(this);
            }
            #endregion
        }
    }
    

    你没看错?我在16号就已经写好了,为什么这么晚才写博客分享出来呢?因为我懒~~~~~~~

  4. 这里需要注意,需要安装simplecrud的nuget包。另外其他的仓储方法只需要继承这个接口以及实现就能够实现基本的增删改查操作了。这里你应该会想,既然继承就能实现,那何不写一个仓储的代码生成器来进行生成呢?说干就干,下面我们就来实现仓储的代码生成器

仓储层代码生成器

上篇生成数据库实体的代码生成器不知道大家看了没有,这里我们只需要在根据每个数据库表生成数据库实体的实体顺带着生成下仓储接口以及仓储代码就可以了。有了思路,我们就撸起袖子加油干吧

  1. 先写一下仓储接口代码生成器的模板,如下所示:

    1545225197161

  2. 再写一下仓储层的代码实现,这里需要注意一下,需要根据注入的ioptionssnapshot来生成_dbopion以及_dbconnection,上面留给大家的思考题答案就在这里,如下所示:

    /**
    *┌──────────────────────────────────────────────────────────────┐
    *│ 描    述:{comment}接口实现                                                    
    *│ 作    者:{author}                                            
    *│ 版    本:1.0    模板代码自动生成                                                
    *│ 创建时间:{generatortime}                             
    *└──────────────────────────────────────────────────────────────┘
    *┌──────────────────────────────────────────────────────────────┐
    *│ 命名空间: {repositorynamespace}                                  
    *│ 类    名: {modelname}repository                                      
    *└──────────────────────────────────────────────────────────────┘
    */
    using czar.cms.core.dbhelper;
    using czar.cms.core.options;
    using czar.cms.core.repository;
    using czar.cms.irepository;
    using czar.cms.models;
    using microsoft.extensions.options;
    using system;
    
    namespace {repositorynamespace}
    {
        public class {modelname}repository:baserepository<{modelname},{keytypename}>, i{modelname}repository
        {
            public {modelname}repository(ioptionssnapshot<dbopion> options)
            {
                _dbopion =options.get("czarcms");
                if (_dbopion == null)
                {
                    throw new argumentnullexception(nameof(dbopion));
                }
                _dbconnection = connectionfactory.createconnection(_dbopion.dbtype, _dbopion.connectionstring);
            }
    
        }
    }
  3. 接着就是代码生成器生成irepository以及生成repository的代码了!这部分代码如下图所示:

    1545225567381

    1545225578141

测试代码

  1. 重新执行下代码生成器的代码,测试的具体代码我已经放在github上了,这里就不贴出来了,直接上生成结果如下图所示:

    1545225741822

  2. 如上图所示:一次性生成了models以及repository,irepository的代码,然后到每个文件夹里面把对应的代码拷贝到对应的项目里面吧。然后我们随便打开一下仓储以及仓储接口看下生成后的代码如下所示:

    /**
    *┌──────────────────────────────────────────────────────────────┐
    *│ 描    述:文章分类                                                    
    *│ 作    者:yilezhu                                              
    *│ 版    本:1.0   模板代码自动生成                                              
    *│ 创建时间:2018-12-18 13:28:43                           
    *└──────────────────────────────────────────────────────────────┘
    *┌──────────────────────────────────────────────────────────────┐
    *│ 命名空间: czar.cms.irepository                                   
    *│ 接口名称: iarticlecategoryrepository                                      
    *└──────────────────────────────────────────────────────────────┘
    */
    using czar.cms.core.repository;
    using czar.cms.models;
    using system;
    
    namespace czar.cms.irepository
    {
        public interface iarticlecategoryrepository : ibaserepository<articlecategory, int32>
        {
        }
    }
    /**
    *┌──────────────────────────────────────────────────────────────┐
    *│ 描    述:文章分类接口实现                                                    
    *│ 作    者:yilezhu                                            
    *│ 版    本:1.0    模板代码自动生成                                                
    *│ 创建时间:2018-12-18 13:28:43                             
    *└──────────────────────────────────────────────────────────────┘
    *┌──────────────────────────────────────────────────────────────┐
    *│ 命名空间: czar.cms.repository.sqlserver                                  
    *│ 类    名: articlecategoryrepository                                      
    *└──────────────────────────────────────────────────────────────┘
    */
    using czar.cms.core.dbhelper;
    using czar.cms.core.options;
    using czar.cms.core.repository;
    using czar.cms.irepository;
    using czar.cms.models;
    using microsoft.extensions.options;
    using system;
    
    namespace czar.cms.repository.sqlserver
    {
        public class articlecategoryrepository:baserepository<articlecategory,int32>, iarticlecategoryrepository
        {
            public articlecategoryrepository(ioptionssnapshot<dbopion> options)
            {
                _dbopion =options.get("czarcms");
                if (_dbopion == null)
                {
                    throw new argumentnullexception(nameof(dbopion));
                }
                _dbconnection = connectionfactory.createconnection(_dbopion.dbtype, _dbopion.connectionstring);
            }
    
        }
    }
  3. 在仓储层以及仓储接口层添加对czar.cms.core的引用,当然你也可以通过nuget包来进行安装

    install-package czar.cms.core -version 0.1.3
  4. 最后在测试代码中进行测试,这里以articlecategoryrepository为例进行测试:

    [fact]
            public void testbasefactory()
            {
                iserviceprovider serviceprovider = buildserviceforsqlserver();
                iarticlecategoryrepository categoryrepository = serviceprovider.getservice<iarticlecategoryrepository>();
                var category = new articlecategory
                {
                    title = "随笔",
                    parentid = 0,
                    classlist = "",
                    classlayer = 0,
                    sort = 0,
                    imageurl = "",
                    seotitle = "随笔的seotitle",
                    seokeywords = "随笔的seokeywords",
                    seodescription = "随笔的seodescription",
                    isdeleted = false,
                };
                var categoryid = categoryrepository.insert(category);
                var list = categoryrepository.getlist();
                assert.true(1 == list.count());
                assert.equal("随笔", list.firstordefault().title);
                assert.equal("sqlserver", databasetype.sqlserver.tostring(), ignorecase: true);
                categoryrepository.delete(categoryid.value);
                var count = categoryrepository.recordcount();
                assert.true(0 == count);
  5. 测试结果如下所示,都已经测试成功了:

    1545226136210

开原地址

这个系列教程的源码我会开放在github以及码云上,有兴趣的朋友可以下载查看!觉得不错的欢迎star

github:https://github.com/yilezhu/czar.cms

码云:https://gitee.com/yilezhu/czar.cms

如果你觉得这个系列对您有所帮助的话,欢迎以各种方式进行赞助,当然给个star支持下也是可以滴!另外一种最简单粗暴的方式就是下面这种直接关注我们的公众号了: img 

第一时间收到更新推送。

总结

一路走来,已经更新到第十二篇了,到这里大伙已经可以基于这个dapper的封装进行自己的业务系统的开发了!当然接下来我会继续完成我们既定的cms系统的业务功能开发,接下来可以用来分享的东西就很少了,所以我更多的是开发然后把代码更新到github以及码云上,想看最新的代码就获取dev分支的代码,有问题的可以提issue或者群里讨论!敬请期待吧!

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网