码迷,mamicode.com
首页 > 其他好文 > 详细

ABP学习笔记

时间:2017-09-15 16:38:49      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:mod   学习笔记   span   str   style   etc   web   ble   ref   

一、ABP配置

 

 

一、ABP配置

//将所有异常发送到客户端
Configuration.Modules.AbpWebCommon().SendAllExceptionsToClients = true;

1,自定义配置

①创建配置类

    public class CustomModule
    {
        public bool IsEnable { get; set; }
    }

 

②定义Configuration扩展

    public static class ModuleConfigrationExt
    {
        public static CustomModule GetCustomModule(this IModuleConfigurations moduleConfigurations)
        {
            return moduleConfigurations.AbpConfiguration.Get<CustomModule>();
        }
    }

③使用自定义配置

            //注册CustomModule配置类
            IocManager.Register<CustomModule>();
            //设置CustomModule配置
            Configuration.Modules.GetCustomModule().IsEnable = true;

 

ABP学习笔记

标签:mod   学习笔记   span   str   style   etc   web   ble   ref   

原文地址:http://www.cnblogs.com/zd1994/p/7526799.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!